on 09-21-2009 4:37 PM
Hello,
would like to know if someone already saw the issue i'm facing and how to avoid it.
I have some code parts looking like :
$query="SELECT id FROM ... WHERE ...";
$result=maxdb_query($link, $query);
while($object=maxdb_fetch_object($result)) {
$query2="SELECT id FROM ... WHERE id='".$object->ID."' ...";
$result2=maxdb_query($link, $query2);
while($object2=maxdb_fetch_object($result2)) {
echo $object2->ID;
...
}
maxdb_free_result($result2);
}
maxdb_free_result($result);
But it seems it doesn't like it, indeed, when such a part of the program is reached, Apache is firing a download emptied PHP webpage.
Any help appreciated.
Some thoughts...
Does it still happen if you take the internal query out?
Is there a way you can avoid the chained query?
Either in a join or by writing a stored proc in maxdb?
Cheers,
Nigel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello dinard,
Can you specify why exactly do you want to use nested "while" loops?
I would use any kind of outer join on the query, in order to avoid your situation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.