rik72 Posted October 25, 2008 Share Posted October 25, 2008 Hi, on the upload of an image, im trying to add the image into 2 databases, one needs adding, one needs updating; Im using this; $sql1 = "UPDATE ".TBL_USERS." SET photo = '$pass' WHERE username = '$username'"; $sql2 = "INSERT INTO user_images (photo, username) VALUES ('$pass', '$username'"; mysql_query($sql1); mysql_query($sql2); sql1 works fine, but sql2 is doing nothing, any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/130108-sql-query-not-working/ Share on other sites More sharing options...
Barand Posted October 25, 2008 Share Posted October 25, 2008 missing ) at the end Quote Link to comment https://forums.phpfreaks.com/topic/130108-sql-query-not-working/#findComment-674638 Share on other sites More sharing options...
dropfaith Posted October 25, 2008 Share Posted October 25, 2008 $sql1 = "UPDATE ".TBL_USERS." SET photo = '$pass' WHERE username = '$username'"; $sql2 = "INSERT INTO user_images (photo, username) VALUES ('$pass', '$username')"; mysql_query($sql1); mysql_query($sql2); Quote Link to comment https://forums.phpfreaks.com/topic/130108-sql-query-not-working/#findComment-674642 Share on other sites More sharing options...
Barand Posted October 25, 2008 Share Posted October 25, 2008 @dropfaith, Congratulations on being able to reproduce his code with the ")" added. So glad you wanted us all to know you can do that. Quote Link to comment https://forums.phpfreaks.com/topic/130108-sql-query-not-working/#findComment-674648 Share on other sites More sharing options...
Vitamin Posted October 26, 2008 Share Posted October 26, 2008 @dropfaith, Congratulations on being able to reproduce his code with the ")" added. So glad you wanted us all to know you can do that. lol Quote Link to comment https://forums.phpfreaks.com/topic/130108-sql-query-not-working/#findComment-674789 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.