I am trying to update my values and something weird is happening, MySQL seems to be updating rows out of its own free will. Here is what I do
UPDATE accountsTable SET Status = 'TerminatedProfile' WHERE id IN (1,2,3)
And it updates either one or two rows not all 3, even if I run the code multiple times. And if I take this query and run it through phpmyadmin it works fine. Is there something wrong with php's mysql implementation or what?
I am using
mysql_connect("$host", "$user", "$password")or die("cannot connect");
mysql_select_db("$db")or die("cannot select DB");
mysql_query($query2);
Update: I was running it on Joomla and perhaps it had something to do with session because one of the rows I was trying to update was on the admin user I was logged in with. Thanks for the responses specially MikeB.