Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/08/2009, 05:21
maxpower2008
 
Fecha de Ingreso: diciembre-2007
Mensajes: 427
Antigüedad: 16 años, 4 meses
Puntos: 35
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in

Hola investigando por este error se que es por q la consulta esta devolviendo un valor vacio pero ejecuto la misma consulta en la bd y si hay resultados que estara pasando.

aqui los archivos
Código PHP:
public function Listar_Persona_Nombre($tabla,$nombre){
        
$sql "Select * from ".$tabla." where nombre ='".$nombre."';";
        
$this->conexion=new Mysql_conection();
        
$this->conexion->conectar();
        
$result=$this->conexion->ejecutar_sql($sql);
        
$num=mysql_num_rows($rst);
        if(
mysql_num_rows($rst)>0){
        
$mostrar="<form action='' method='post'>";
        
$mostrar.= "<center><table border=1 bgcolor=#CCCCCC><th>nombre<th>apellido";
        
$cont=1;
        while(
$fila=mysql_fetch_array($rst) ){
        
$mostrar.= "<tr><td>".$fila[0]."</td><td>".$fila[1]."</td><td></tr>";
        
$cont++;
        }
//end while
        
$mostrar.="</center></table></form><br><center>Se encontraron $num registros</center>";

        }else{
        
$mostrar="No se encontraron Registros en la BD";
        }
        
$this->conexion->desconectar($rst);

        return 
$mostrar;
            
    } 
Gracias por leer el mensaje y cualquier ayuda me sirve.