Query within while loop?

wxdqz

New Member
It is possible to query a mysql database whilst in a while loop that has alrady just queried the database...

eg:
//query one
$sql=mysql_query(SELECT * FROM $table WHERE blah='$blah'");
while($row=mysql_fetch_array($sql))
{
//query two
$sql2=mysql_query("SELECT FROM $table2 WHERE blah='$blah'")
while($row2=mysql_fetch_array($sql2))
{
print ("$row2[0];");
}

}

or is it too taxing on the server.

rgds,
scott d~
 
Back
Top