I am totally confused about this.
I am running this code at the bottom of my script:
mysql_free_result($QUERY);
unset($QUERY);
foreach ($Completed_IDs as $ID) {
$UPDATE_QUERY_Str = "UPDATE special_lists SET completed=1 WHERE id=".$ID;
$UPDATE_QUERY = mysql_query($UPDATE_QUERY_Str, $LocalDB) or die('MySQL Error: '.mysql_error().' | Query: '.$UPDATE_QUERY_Str);
}
This is the output I get:
MySQL Error: | Query: UPDATE special_lists SET completed=1 WHERE id=7
The only other line of code pertaining to this table in the script is at the top, it is:
$QUERY = mysql_query("SELECT special_lists.id as id, special_lists.area, special_lists.sponsor_id, users.email FROM special_lists, users WHERE special_lists.completed='0' AND (special_lists.user_id=users.user_id)", $LocalDB);
if (DEBUG) {
echo mysql_error();
}
while ($Data = mysql_fetch_array($QUERY, MYSQL_ASSOC)) {
//do some stuff
}
And as the subject explains, the UPDATE doesn't do anything. If I copy/paste it into phpMyAdmin and run it, it does update though.
Any thoughts?? 🙁
Thanks in advance,
Tom 🙁