Jump to content

phpMyAdmin query works, but PHP query doesn't...


Genesis730

Recommended Posts

I'm trying to update every record where one field in a row is less than the other. The code gets each row i'm looking for and sets up the query right, I hope :) I combined the entire query into one string each query seperated by a ; so it's like

UPDATE `table` SET field2= '1' WHERE field1= '1';UPDATE `table` SET field2= '1' WHERE field1= '2';UPDATE `table` SET field2= '1' WHERE field1= '3';UPDATE `table` SET field2= '1' WHERE field1= '4';UPDATE `table` SET field2= '1' WHERE field1= '5';

this executes properly if i run the query in phpMyAdmin, however when I run the query in PHP, it does nothing... Any advice?

From the mysql_query() documentation -

 

mysql_query() sends a unique query (multiple queries are not supported) to the currently active database on the server that's associated with the specified link_identifier.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.