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? 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 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); 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. 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 Quote @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 Link to comment https://forums.phpfreaks.com/topic/130108-sql-query-not-working/#findComment-674789 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.