Re: How can I test each record from the query

From: Date: Mon, 08 Jan 2001 15:29:28 +0000
Subject: Re: How can I test each record from the query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-33238@lists.php.net to get a copy of this message
Try $query=mysql_query("Select Employee_ID from Employee where Sex='Male'") while( $var = mysql_fetch_row( $query ) ){ $x = $var['fieldname']; #code here } ----- Original Message ----- From: Wee Chua <Chua@mail.interclean.com> To: PHP (E-mail) <php-general@lists.php.net> Sent: Monday, January 08, 2001 4:40 PM Subject: [PHP] How can I test each record from the query > 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. > > Calvin Chua > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#33238) next »