sthealth Posted February 11, 2007 Share Posted February 11, 2007 hello, im writing an application form for a warcraft guild website which will insert the submitted field details into a mysql database. when writing the script to setup this database i get a 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 20'. following is the code and im not sure what is causing this error. thanks in advance for any assistance. <html> <head> <title>Database setup</title> </head> <body> <?php // Connects to your Database - NB: real mysql info not displayed for question purpose mysql_connect("xxxxx", "xxxxx", "xxxxx") or die(mysql_error()); mysql_select_db("xxxxx") or die(mysql_error()); // setup table mysql_query("CREATE TABLE appl( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(250), class VARCHAR(250), race VARCHAR(250), level INT, age INT, email VARCHAR(250), time VARCHAR(250), hours VARCHAR(250), karazhan VARCHAR(250), pone VARCHAR(250), skillone INT, ptwo VARCHAR(250), skilltwo INT, firstaid VARCHAR(250), gear VARCHAR(250), talent VARCHAR(250), whyjoin VARCHAR(250)") or die(mysql_error()); ?> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/38006-syntax-error-with-mysql_querycreate-table/ Share on other sites More sharing options...
sasa Posted February 11, 2007 Share Posted February 11, 2007 you forget ) in the end must be ... whyjoin VARCHAR(250))") Quote Link to comment https://forums.phpfreaks.com/topic/38006-syntax-error-with-mysql_querycreate-table/#findComment-181905 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.