Welcome Guest, Not a member yet? Register   Sign In
Multiple update in single query.
#1

[eluser]Arun Joshi[/eluser]
I have to update multiple rows of my photos table. I have a dynamic built query like this.

Code:
$query    =    "
UPDATE photos SET description='des one' WHERE photo_id='4';
UPDATE photos SET description='des two'' WHERE photo_id='5';
UPDATE photos SET description='des 3' WHERE photo_id='6';
";
But when I tried this with $this->db->query($query); it shows error. When I copied this query to phpmyadmin, it executed successfully.

Any reason there for this?

Thanks
Arun


Messages In This Thread
Multiple update in single query. - by El Forum - 09-22-2010, 02:18 AM
Multiple update in single query. - by El Forum - 09-22-2010, 04:41 AM
Multiple update in single query. - by El Forum - 09-22-2010, 04:49 AM
Multiple update in single query. - by El Forum - 09-22-2010, 04:52 AM
Multiple update in single query. - by El Forum - 09-22-2010, 05:08 AM
Multiple update in single query. - by El Forum - 09-22-2010, 05:29 AM
Multiple update in single query. - by El Forum - 09-22-2010, 05:35 AM
Multiple update in single query. - by El Forum - 09-22-2010, 03:05 PM
Multiple update in single query. - by El Forum - 04-13-2012, 02:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB