Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/08/2013, 16:23
rascabuchitos
 
Fecha de Ingreso: abril-2011
Ubicación: Peru
Mensajes: 486
Antigüedad: 13 años, 11 meses
Puntos: 9
mysql_fetch_assoc()

hola amigos
quiero editar unos registros en web pero me sale esto:

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/webdevel/public_html/00/editar.php on line 23

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/webdevel/public_html/00/editar.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /home/webdevel/public_html/00/editar.php:23) in /home/webdevel/public_html/00/editar.php on line 26

y en esas lineas tengo esto:

Código PHP:
Ver original
  1. $sql = "SELECT * FROM empresa WHERE id = ".sqlValue($idempresa, "int");
  2. $queEmp = mysql_query($sql, $conexion);
  3. $rsEmp = mysql_fetch_assoc($queEmp);
  4. $total = mysql_num_rows($queEmp);
  5. if ($total == 0) {
  6.     header("location: listado.php");
  7.     exit;
  8. }
  9. ?>

he estado buscando en internet
y me dice que mysql_fetch_assoc() ya es obsoleto

agradeceria su orientacion para actualizar y poder hacer validera mi edicion


gracias