Re: New to PHP Need Help
| From: | Julie Meloni | Date: | Thu, 04 Apr 2002 16:18:03 +0000 |
| Subject: | Re: New to PHP Need Help | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18210@lists.php.net to get a copy of this message | ||
JT> $Location_Info = mysql_fetch_row($result);
JT> echo "<p>$Location_Info";
After you fetch the row, you have to extract the elements from the
array that makes up the row. For more than one row in your result, you have to call
mysql_fetch_row() again.
From http://www.php.net/manual/en/function.mysql-fetch-row.php
:
mysql_fetch_row -- Get a result row as an enumerated array
Examples of using this function follow on the manual page.
I would venture to guess that what you really want to use would be
mysql_fetch_array(), which also produces an array of results, but
_all_ of the rows, not just the first one (and thus does not require
additional calls to the function).
From http://www.php.net/manual/en/function.mysql-fetch-array.php
:
mysql_fetch_array -- Fetch a result row as an associative array, a numeric array, or both.
With examples also on the manual page.
- Julie
--> Julie Meloni
--> julie@thickbook.com
--> www.thickbook.com
Find "Sams Teach Yourself MySQL in 24 Hours" at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20