Hi All, I am trying to run the following query using mysql :
update alerttable set status=4 where status=0
The update does not happen. I am suspecting that it may be because I have the column named "status", is "status" a reserved word ? When I run the query, I do not get an error message, but the rows with status equal to zero stay at the value zero. The status column is defined as a tinyint.
I tried to pick a differant column of the table and rerun the query and it works fine , it just wont seem to work on this column. The column is not an index or key or anything like that.
Thanks very much. I wonder if something wierd is going on with my sqlYog app which is what I am using to run the query. I tried to run it again on a differant database I had , and this time it worked. Not sure what is up, but I do appreciate your input ! Thanks for letting me know that status is not a reserved mysql word.
Are you using prepared statements to run the query. I onced suffered a few hours with that in MySQL, and it happens that MySQL does not support prepared statements, therefor it simply ignores the query and does nothing.
It really pissed me off, because it worked fine in PostgreSQL.
Originally posted by Edwin Dalorzo: ...and it happens that MySQL does not support prepared statements...
Good thing I didn't know that. Because I have an application that uses PreparedStatements to read and update a MySQL database. It works fine and has been working fine for several years now.
As far as I know, the prepared statement feature is present since version 4.1. Then it could be a good idea to check anyway. [ July 25, 2006: Message edited by: Edwin Dalorzo ]