Ver Mensaje Individual
  #4 (permalink)  
Antiguo 16/08/2007, 16:29
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: Duda con Active Record y Active Table

El "pero" que tiene es acostumbrarnos a utilizar objetos en lugar de sentencias SQL, es decir en lugar de usar:
Código PHP:
$sql "SELECT COUN(*) FROM registros WHERE `userid`=" $userid;
$result mysql_query$sql ) or die( mysql_error() );
$row mysql_fetch_array$result );
$noRegistros $row[0]; 
A:
Código PHP:
$noRegistros $usuarios->getCuentaRegistros$idUsuario ); 
Saludos.