Jump to content

[SOLVED] Another problem with SQL [INSERT related]


cpd

Recommended Posts

Ignoreing all the information and things im trying to input into the database (Its for a Flight Simulator Website), could somebody please tell me why this query wont submit. When it is submited NO errors are returned therefore i presume the query has been sent however when i look in the database there is NOTHING.

 

    mysql_query("INSERT INTO `users` (joined,pilotid,name,email,country,dob,password,simulator,hub,vatsimid,ivaoid,hours,proof,comments,code,activeated) VALUES ('$date','$pilotid','$name','$email','$country','$dob','$password','$simulator','$hub','$vatsimid','$ivaoid','$hours','$code','n')");

 

And just incase anybody says something about "Have i defined all the variables" your answer is yes i have but that wouldnt make any difference anyway. If i had defined them incorrectly the value thats input would be NULL.

Cheers in advance ;)

Link to comment
Share on other sites

If you get no errors, then you must have set error display to off.  Your query makes no syntactical sense and has more fields defined than data supplied.

 

Time for a tutorial - try www.tizag.com

 

And do yourself a huge favour - set mysql queries to generate errors that make sense and echo the query

Link to comment
Share on other sites

Thanks for the tutorial, And the advice about either erroring it or echoing it out, I errored it and it was as simple as i spelt "activated" like that in field name and where i tried to enter the data it was (...,code,activeated). Simple spelling errors.

 

Thanks Andy

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.