Jump to content

Quick Question


divinedesigns1
 Share

Recommended Posts

If this topic gets longer than the first response, i hold no responsiblity, considering people will post their opinions and might ask questions. Anyway the question is below when your inserting form data into mysql, dont you do this "INSERT INTO users WHERE email='$email', name='$email_this', password='$email_that'"; wouldnt that insert the information into the database or am i missing something?

Link to comment
Share on other sites

INSERT does not have where clause, SELECT or UPDATE or DELETE has WHERE clause. but the conditions have to logical AND,OR separated in WHERE not comma. resource:http://dev.mysql.com/doc/refman/5.0/en/expressions.htmlhttp://dev.mysql.com/doc/refman/5.5/en/insert.html

Link to comment
Share on other sites

INSERT does not have where clause, SELECT or UPDATE or DELETE has WHERE clause. but the conditions have to logical AND,OR separated in WHERE not comma. resource:http://dev.mysql.com...xpressions.htmlhttp://dev.mysql.com.../en/insert.html
Thanks for the links, and yeah im still trying to figure out why it wouldnt insert even without the WHERE clause
Link to comment
Share on other sites

how does that query look? you can always use mysql_error(), it will tell you or point towards reasons of query failure

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...