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 ;)

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.