unplugged_web Posted October 10, 2012 Author Share Posted October 10, 2012 Do you know what your query looks like before it gets executed? have you tried the same query via command line or phpMyAdmin?If I try adding is directly using phpmyadmin (just replacing $title, $style and $image_id with the actual values) then exactly the same thing happens. Only title updates but no matter what I add it only changes to '0' Link to comment Share on other sites More sharing options...
JamesB Posted October 10, 2012 Share Posted October 10, 2012 i think it's currently getting evaluated as UPDATE images SET title = ('$title' AND category = '$style') WHERE id = '$image_id' try using a comma instead of AND to update multiple cells. Link to comment Share on other sites More sharing options...
unplugged_web Posted October 10, 2012 Author Share Posted October 10, 2012 (edited) i think it's currently getting evaluated asUPDATE images SET title = ('$title' AND category = '$style') WHERE id = '$image_id' try using a comma instead of AND to update multiple cells. Brilliant thank you, that's now working. Edited October 10, 2012 by thehappyappy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now