Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/11/2005, 13:32
jguzmansu
 
Fecha de Ingreso: septiembre-2004
Mensajes: 18
Antigüedad: 19 años, 7 meses
Puntos: 0
Pregunta Problemas con UPDATE

Saludos, estoy haciendo un UPDATE en una tabla y me sale el siguiente error:

"Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\wamp\www\roche\demo\pregunta2.php on line 33
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE cod_usu = 137' at line 1"


El código que tengo para realizar el update es el siguiente, la verdad no veo en donde pueda ser el error, les agradecería mucho si me pueden ayudar.

// Actualizo la tabla de puntajes de acuerdo a la respuesta del usuario
$SQLquery_puntajes = "UPDATE puntajes SET resp_trivia = '$voto', resp_bien = '$bien', resp_mal = '$mal', resp_time = '$hora', resp_tot = 5, WHERE cod_usu = $cod_usuario";
mysql_select_db($database_roche,$roche);
$SQLresult_puntajes = mysql_query($SQLquery_puntajes,$roche);
$nroRegistros = mysql_num_rows($SQLresult_puntajes);
if ($nroRegistros ==0){
$error = die(mysql_error());
$strMsgErr = "Error al tratar de actualizar los datos. Por favor revise sus datos e intente nuevamente <br>".$error;
echo $strMsgErr;
}

Gracias de nuevo por su colaboración.