Stickybomb Posted October 10, 2007 Share Posted October 10, 2007 i am getting an error when trying to add a user to my database the error: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource this is the call for the statment: $db->query('INSERT INTO users (user_pass, user_name, user_lvl, user_email, user_timestamp, user_sid, user_ip) VALUES ("'.$pass.'","'.$user.'","1",,"'.$email.'","'.$time.'","'.$sid.'","'.$ip.'")'); i do not see whats causeing the poblem Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted October 10, 2007 Share Posted October 10, 2007 Try this $db->query('INSERT INTO users VALUES ("'.$pass.'","'.$user.'",1,"'.$email.'","'.$time.'","'.$sid.'","'.$ip.'")'); Quote Link to comment Share on other sites More sharing options...
Stickybomb Posted October 10, 2007 Author Share Posted October 10, 2007 hmm nope same error Quote Link to comment Share on other sites More sharing options...
otuatail Posted October 10, 2007 Share Posted October 10, 2007 Dont know what the dots are but insert into users values($pass , $user , $email , $sid , $ip) is all thats needed Quote Link to comment Share on other sites More sharing options...
fenway Posted October 10, 2007 Share Posted October 10, 2007 Dont know what the dots are but insert into users values($pass , $user , $email , $sid , $ip) is all thats needed Not true -- NEVER omit the column names. Echo the interpolated string. Quote Link to comment Share on other sites More sharing options...
Stickybomb Posted October 10, 2007 Author Share Posted October 10, 2007 I never intended to omit the columns, I just want to know why i get this error any thoughts or suggestions Quote Link to comment Share on other sites More sharing options...
BYGino Posted October 11, 2007 Share Posted October 11, 2007 Don't know if it will make much difference but you're first code has a double comma between your user_level and email strings. Quote Link to comment Share on other sites More sharing options...
Stickybomb Posted October 11, 2007 Author Share Posted October 11, 2007 already got it working but thanks Quote Link to comment Share on other sites More sharing options...
fenway Posted October 11, 2007 Share Posted October 11, 2007 already got it working but thanks How? Quote Link to comment Share on other sites More sharing options...
Stickybomb Posted October 12, 2007 Author Share Posted October 12, 2007 there was a spelling error in my statement 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.