RE: [PHP] How can I test each record from the query
| From: | Boget, Chris | Date: | Mon, 08 Jan 2001 14:43:06 +0000 |
| Subject: | RE: [PHP] How can I test each record from the query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-33230@lists.php.net to get a copy of this message | ||
> Hi all,
> How could I test each record from the query. For example, my query is
> $query=mysql_query("Select Employee_ID from Employee where
> Sex='Male'",$db)
> if the query returns 5 employees, how could I retrieve each
> Employee_ID inside $query to test something else each time like (select
> Salary from Salary where Employee_ID) ? Thank in advance for any helps.
Look into:
mysql_result()
and
mysql_fetch_array()
or
mysql_fetch_row()
Chris