Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/12/2008, 13:15
Avatar de ACX_POISON
ACX_POISON
 
Fecha de Ingreso: abril-2008
Ubicación: Talca-Chile
Mensajes: 750
Antigüedad: 16 años, 10 meses
Puntos: 7
Respuesta: Llamando a Función MAX ID y no funciona

Código PHP:
function newId()
{   
    require_once (
"includes/connect.php");
    
    
$sql_select_id "SELECT MAX(news_id) FROM news_index";
    
$sql_query mysql_query($sql_select_id);
    
$R=mysql_fetch_row($sql_query);

   
$id=$R[0];
    
$n_id=$id+1;
    return 
$n_id;

y esto funcionará
__________________
Me junto con los que Saben, Queriendo Saber.