$sqlTable = "CREATE TABLE " . DB_USERS_NAME . ", "; // Table Name
$sqlTable .= DB_USERS_0 . " INT NOT NULL AUTO_INCREMENT, "; // User ID
$sqlTable .= DB_USERS_1 . " VARCHAR(" . DB_USERS_1_SIZE . ") BINARY NOT NULL, "; // Username
$sqlTable .= DB_USERS_2 . " VARCHAR(" . DB_USERS_2_SIZE . ") BINARY NOT NULL, "; // Password :?:
$sqlTable .= "PRIMARY KEY (" . DB_USERS_0 . ")"; // Set Primary Key
The error says there is a problem with the sql but I don't know enough of sql to see what the problem is. Can anyone else see what's wrong with my sql?
First off, make sure your not using @ before your query execution line in your script.
If not, comment out the query execution and then echo out your query string right before you execute it in your script.
Now if you've got PHPMyAdmin try run the echo'd query through there, if it gives an error it will be more specific and you will probably be able to fix it from there.
If you can't, post PHPMyAdmin's error. If you don't have PHPMyAdmin, post the query your script echo'd after making the above changes. Also, post your full script so we can see how you are executing the query and what you defined the constants as.
#1064 - 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 ' user_id INT NOT NULL AUTO_INCREMENT, user_name VARCHAR(20) BINARY NOT NULL, use' at line 1