06-12-2008, 07:49 PM
|
#1 (permalink)
|
|
The Addict
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
|
having nested mysql_fetch_assoc statements
is it possible to have something like this?
because in the nested query i am getting an error
the error says:
<b>Warning</b>: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
this is the sql statement: select label from tbl_group order by id
Code:
$sql1 = "select * from table";
$sql2 = "select * from anothertable";
while($row1 = mysql_fetch_assoc($sql1)) {
// do something
while($row = mysql_fetch_assoc($sql2)) {
// do something else
}
}
thnx
__________________
no signature set
|
|
|
|