Re: mysql_fetch_array
| From: | M. Sokolewicz | Date: | Sat, 03 Nov 2007 08:45:08 +0000 |
| Subject: | Re: mysql_fetch_array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264008@lists.php.net to get a copy of this message | ||
Eduardo Vizcarra wrote:
I have a WHILE sentence to retrieve all records from a SELECT query in a database and am using mysql_fetch_array to store them in a matrix, the sentence is like this: while($row=mysql_fetch_array($fotos)) { $fotos_mostrar[] = $row; } $fotos contains all records found in a db table, the SELECT statement is retrieving 2 columns from a table, how do I store all records in a 2 dimention table so I can use it later ? this WHILE sentence seems to only store the last record only RegardsAre you sure your query is returning > 1 row ? Because from the looks of the code you posted it should do exactly what you expect it to.