Do you get any of the other debug info after that message (the stuff that would be output by the following echo of $sql and then mysql_error())?
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
What is the very last part of the error output, i.e. the result of the mysql_error() call? That should tell you what part of the query MySQL did not like.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
I suppose it's possible, though it would seem unlikely. I'd be more suspicious that one MySQL installation is configured to run in MySQL 4 compatibility mode while the other is not (see the "bug" report link in my previous reply). You can try adding the following to your script after the mysql connection is made but before the query is executed, in order to make it run in MySQL 4 mode, too:
PHP Code:
mysql_query("set sql_mode = ''");
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
If the issue is the same as described in that "bug" report, it could be a case where you are trying to assign an empty string to an integer field, in which case you should use the keyword NULL instead of empty quotes for that value (or else a zero if that's what you really want).
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks