Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/12/2008, 12: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
Respuesta: Ayuda con el comando SELECT MAX !!

No es necesario hacer un while, perfectamente puedes hacer esto:
Código php:
Ver original
  1. $consulta_ultimo_id = "SELECT max(llamados_id) FROM llamados WHERE llamados_usuario='$usuario'";
  2. $resultado_ultimo_id = mysql_query($consulta_ultimo_id);
  3. $ultimo_id_row = mysql_fetch_row($resultado_ultimo_id);
  4. $ultimo_id = $ultimo_id_row[0];

Saludos.