Hartley Posted July 10, 2007 Share Posted July 10, 2007 I have a setup script to setup member accounts, and for some reason, it won't run multiple queries for me. $conn1 = mysql_connect($dbhost1, $dbuser1, $dbpass1) or die ('Error connecting to mysql'); mysql_select_db($dbname1); mysql_query("INSERT INTO user (forumid, username, joindate) VALUES ('$forumid', '$username', '$joindate')") or die(mysql_error()); mysql_query("INSERT INTO attunement (forumid) VALUES ('$forumid')") or die(mysql_error()); mysql_close($conn1); The first one runs just fine, but the second one doesn't at all and I simply can't figure out why. Quote Link to comment Share on other sites More sharing options...
trq Posted July 10, 2007 Share Posted July 10, 2007 Are you getting an error? Where are all these ($forumid, $username, $joindate) variables being defined? Quote Link to comment Share on other sites More sharing options...
Hartley Posted July 10, 2007 Author Share Posted July 10, 2007 Getting no error, it runs just fine, just doesn't do the second part. The variables are all defined earlier in the script ($forumid based off of the cookies, the other 2 based off of forum information taken from the $forumid). Quote Link to comment Share on other sites More sharing options...
shamilton Posted July 10, 2007 Share Posted July 10, 2007 Have you tried hard coding the values in? How about swapping the order of the queries? Are you sure you have error messages turned on? Try checking the state of the query and echoing out some random text to see if it is even getting to the second one. Quote Link to comment 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.