Ver Mensaje Individual
  #15 (permalink)  
Antiguo 22/02/2010, 14:07
Avatar de jackson666
jackson666
 
Fecha de Ingreso: noviembre-2009
Ubicación: Buenos Aires, Argentina
Mensajes: 1.971
Antigüedad: 14 años, 6 meses
Puntos: 65
Respuesta: borrar registros MySQL & PHP

Es curioso pero si te fijas en el manual dice lo siguiente:

http://php.net/manual/en/function.mysql-fetch-assoc.php

Cita:
Returns an associative array that corresponds to the fetched row and moves the internal data pointer ahead. mysql_fetch_assoc() is equivalent to calling mysql_fetch_array() with MYSQL_ASSOC for the optional second parameter. It only returns an associative array.
Lo cual, por si no entendes del todo ingles se traduce (solo la parte roja)

Cita:
mysql_fetch_assoc() es equivalente a usar la funcion mysql_fetch_array() con el segundo parametro opcional MYSQL_ASSOC
Y si te fijas en el manual en la explicacion de la funcion mysql_fetch_array() dice que

Cita:
Returns an array of strings that corresponds to the fetched row, or FALSE if there are no more rows. The type of returned array depends on how result_type is defined. By using MYSQL_BOTH (default), you'll get an array with both associative and number indices. Using MYSQL_ASSOC, you only get associative indices (as mysql_fetch_assoc() works), using MYSQL_NUM, you only get number indices (as mysql_fetch_row() works).
Y esa parte se traduce a

Cita:
MYSQL_BOTH (por defecto)
O sea, usar una u otra, en este caso, da lo mismo...
No son buenos habitos o no, es simple, es lo mismo, no viene al caso...
__________________
HV Studio
Diseño y desarrollo web

Última edición por jackson666; 22/02/2010 a las 14:13