me1000 Posted November 20, 2005 Share Posted November 20, 2005 hello I have been reading the php book, php and mysql web development. im getting into the sql part of it now, im using the wamp server hosted on my computer its just for testing purposes so i do not have to upload all my files. anyway heres my sql file create table customers ( customerid int unsigned not null auto_increment primary key, name char(30) not null, address char(40) not null, city char(20) not null, ); I have run it through phpMyAdmin and Im getting this error [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]#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 ')' at line 6 the sql query is CREATE TABLE customers( customerid int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY , name char( 30 ) NOT NULL , address char( 40 ) NOT NULL , city char( 20 ) NOT NULL , ) i really have no idea whats wrong with it, im using mysql 5 and i have copied it exactly as the bok has it. {Edit} I also tried the sql comandline not sure if im doing this right if not could you please correct me, mysql> -h localhost -u bookorama books -p < c:/wamp/www/php/bookorama.sql; ERROR 1064 (42000): 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 '-h lo calhost -u bookorama books -p < c:/wamp/www/php/bookorama.sql' at line 1 mysql> thank you, Me1000 Quote Link to comment https://forums.phpfreaks.com/topic/2900-whats-wrong-with-this/ 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.