[PHP] Need help with for loop, pulling MySQL data, completely lost

2005-08-21 Thread Dan Trainor
Hello, all - As a pet project of mine, I've decided to write a bit of code. This is what I have, and it's not working as expected: if ($action == prepareforupdate) { @unlink(UPDATES/.$id./9.jpg); $query0 = SELECT * FROM updates WHERE id=.$id.; if (!$dbdata =

Re: [PHP] Need help with for loop, pulling MySQL data, completely lost

2005-08-21 Thread Evan Priestley
Dan, When you run the second query ($query1), its results overwrite the results of your first query ($query0). `mysql_fetch_assoc()' returns results from the _most recent_ query, so after the first iteration, the call to `mysql_fetch_assoc()' is returning results from `query1', not from

Re: [PHP] Need help with for loop, pulling MySQL data, completely lost

2005-08-21 Thread Dan Trainor
Evan Priestley wrote: Dan, When you run the second query ($query1), its results overwrite the results of your first query ($query0). `mysql_fetch_assoc()' returns results from the _most recent_ query, so after the first iteration, the call to `mysql_fetch_assoc()' is returning results