Ver Mensaje Individual
  #3 (permalink)  
Antiguo 17/04/2015, 10:34
Avatar de gerrycrush
gerrycrush
 
Fecha de Ingreso: abril-2015
Ubicación: Mexico
Mensajes: 9
Antigüedad: 9 años
Puntos: 0
Respuesta: ERROR: mysql_num_rows() expects parameter 1

Ok agrego el codigo, pienso que el error esta en la consulta..., sigo intentando:

Código PHP:
Ver original
  1. <?php
  2. class DB{
  3.     var $conect;
  4.  
  5.     var $BaseDatos;
  6.     var $Servidor;
  7.     var $Usuario;
  8.     var $Clave;
  9.     function DB(){
  10.         $this->BaseDatos = "computo";
  11.         $this->Servidor = "localhost";
  12.         $this->Usuario = "root";
  13.         $this->Clave = "";
  14.     }
  15.  
  16.      function conectar() {
  17.         if(!($con=@mysql_connect($this->Servidor,$this->Usuario,$this->Clave))){
  18.             echo"<h1> [:(] Error al conectar a la base de datos</h1>"; 
  19.             exit();
  20.         }
  21.         if (!@mysql_select_db($this->BaseDatos,$con)){
  22.             echo "<h1> [:(] Error al seleccionar la base de datos</h1>";  
  23.             exit();
  24.         }
  25.         $this->conect=$con;
  26.         return true;   
  27.     }
  28. }
  29. ?>