
13/05/2014, 21:13
|
| | Fecha de Ingreso: agosto-2010
Mensajes: 125
Antigüedad: 14 años, 7 meses Puntos: 0 | |
Respuesta: Actualizar registros hola de nuevo
corrigiendo
$c = count($_POST["id"]);
if ($c > 0) {
for ($i=0; $i<$c; $i++) {
$id = $_POST["id"][$i];
$no_lista= $_POST["no_lista"][$i];
echo "update calf set no_lista='$no_lista' WHERE id='$id'";
$query=mysql_query("update calf set no_lista='$no_lista' WHERE id='$id'",$cn)or die("Error: ".mysql_error($cn));
}
}
me muestra estos errores
update calf set no_lista='1' WHERE id='6'
Warning: mysql_query() expects parameter 2 to be resource, object given in
Warning: mysql_error() expects parameter 1 to be resource, object given in
en esta linea $query=mysql_query("update calf set no_lista='$no_lista' WHERE id='$id'",$cn)or die("Error: ".mysql_error($cn)); |