You can do that with one mysql query. Create a comma delimited list of $id
and change your where clause to "WHERE id in (your comma delimited list)".
----- Original Message -----
From: "Cody Law" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2001 20:11
Subject: Does query inside while loop slow down page?
> Hi,
> When you do a query inside a while loop in PHP,
> does it dramatically slow down the loading of the
> page? For example,
>
> while($row = mysql_fetch_row($result)) {
> $id = $row[0];
> $query2 = "select field from some_table
> where(id='$id')";
> $result2 = mysql_result($query2, $link);
> }
>
> Does it have anything to configuring the buffer length
> when you install MYSQL? Thank you.
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php