RE: [PHP] MySQL Select
| From: | Jon Haworth | Date: | Thu, 24 May 2001 10:09:02 +0000 |
| Subject: | RE: [PHP] MySQL Select | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-54193@lists.php.net to get a copy of this message | ||
Because you can also do:
if ($array_result = mysql_fetch_array($result)) {
do {
// do your thing here
} while ($array_result = mysql_fetch_array($result));
} else {
echo "no records found!";
}
Cheers
Jon
-----Original Message-----
From: Chris Lee [mailto:lee@mediawaveonline.com]
Sent: 23 May 2001 21:28
To: php-general@lists.php.net
Subject: Re: [PHP] MySQL Select
why not just simply it more
while ($r = mysql_fetch_array($result))
{
// do your thing here
}
--
Chris Lee
lee@mediawaveonline.com
"Jon Haworth" <jhaworth@witanjardine.co.uk> wrote in message
news:67DF9B67CEFAD4119E4200D0B720FA3F53FA57@BOOTROS...
> Something like:
>
> if ($array_result = mysql_fetch_array($result)) {
> do {
> // do your thing here
> } while ($array_result = mysql_fetch_array($result));
> }
>
> HTH
> Jon
>
>
> -----Original Message-----
> From: Jamie Thompson [mailto:jamie@tempoweb.com]
> Sent: 23 May 2001 14:33
> To: php-general@lists.php.net
> Subject: [PHP] MySQL Select
>
>
> ok...sorry to ask a stupid question but....
>
> $result = mysql_query("SELECT jazz FROM funk WHERE foo='bar'")
>
> but where do you go from there. How would you iterate through the array a
> row at a time, doing your thing as you go along?
>
> thanks,
>
> jamie
>
>
> --
> 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
>
>
>
> **********************************************************************
> 'The information included in this Email is of a confidential nature and is
> intended only for the addressee. If you are not the intended addressee,
> any disclosure, copying or distribution by you is prohibited and may be
> unlawful. Disclosure to any party other than the addressee, whether
> inadvertent or otherwise is not intended to waive privilege or
> confidentiality'
>
> **********************************************************************
>
> --
> 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
>
--
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