techker Posted August 5, 2008 Share Posted August 5, 2008 hey guys i got this from a book and it keeps on givving me erreurs on line 4 CREATE TABLE WROX_SHOP_INVENTORY ( ITEM_ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, ITEM_NAME VARCHAR(100) NOT NULL, ITEM_DESCRIPTION TEXT DEFAULT ‘’, PRICE DOUBLE(5,2) NOT NULL, ITEM_IMAGE VARCHAR(255) NOT NULL, CATEGORY_ID INTEGER UNSIGNED NOT NULL, PRIMARY KEY (ITEM_ID), FOREIGN KEY (CATEGORY_ID) REFERENCES WROX_SHOP_CATEGORY(CATEGORY_ID) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_general_cs_AUTO_INCREMENT=0 Quote Link to comment https://forums.phpfreaks.com/topic/118181-mysql-insert/ Share on other sites More sharing options...
revraz Posted August 5, 2008 Share Posted August 5, 2008 What is ‘’ ? Quote Link to comment https://forums.phpfreaks.com/topic/118181-mysql-insert/#findComment-608271 Share on other sites More sharing options...
techker Posted August 5, 2008 Author Share Posted August 5, 2008 SQL query: CREATE TABLE WROX_SHOP_INVENTORY( ITEM_ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT , ITEM_NAME VARCHAR( 100 ) NOT NULL , ITEM_DESCRIPTION TEXT DEFAULT, PRICE DOUBLE( 5, 2 ) NOT NULL , ITEM_IMAGE VARCHAR( 255 ) NOT NULL , CATEGORY_ID INTEGER UNSIGNED NOT NULL , PRIMARY KEY ( ITEM_ID ) , FOREIGN KEY ( CATEGORY_ID ) REFERENCES WROX_SHOP_CATEGORY( CATEGORY_ID ) ON DELETE CASCADE ) ENGINE = InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_general_cs_AUTO_INCREMENT =0 MySQL said: #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 ' PRICE DOUBLE(5,2) NOT NULL, ITEM_IMAGE VARCHAR(255) NOT NULL, CATEGORY' at line 4 if i remove the'' Quote Link to comment https://forums.phpfreaks.com/topic/118181-mysql-insert/#findComment-608477 Share on other sites More sharing options...
revraz Posted August 6, 2008 Share Posted August 6, 2008 I meant you used non standard Quotes before. Quote Link to comment https://forums.phpfreaks.com/topic/118181-mysql-insert/#findComment-609307 Share on other sites More sharing options...
techker Posted August 6, 2008 Author Share Posted August 6, 2008 ?this , Quote Link to comment https://forums.phpfreaks.com/topic/118181-mysql-insert/#findComment-609579 Share on other sites More sharing options...
fenway Posted August 6, 2008 Share Posted August 6, 2008 ?this , What on earth are you talking about. Quote Link to comment https://forums.phpfreaks.com/topic/118181-mysql-insert/#findComment-609593 Share on other sites More sharing options...
techker Posted August 6, 2008 Author Share Posted August 6, 2008 standard Quotes where are they?i was saying maybe this( ,) Quote Link to comment https://forums.phpfreaks.com/topic/118181-mysql-insert/#findComment-609598 Share on other sites More sharing options...
fenway Posted August 6, 2008 Share Posted August 6, 2008 That's a comma... you were using ticks. Use quotes ('). Quote Link to comment https://forums.phpfreaks.com/topic/118181-mysql-insert/#findComment-609900 Share on other sites More sharing options...
techker Posted August 6, 2008 Author Share Posted August 6, 2008 supprising cause this comes out of a book?? is this cause of the version? Quote Link to comment https://forums.phpfreaks.com/topic/118181-mysql-insert/#findComment-610220 Share on other sites More sharing options...
fenway Posted August 7, 2008 Share Posted August 7, 2008 supprising cause this comes out of a book?? is this cause of the version? Nope. Quote Link to comment https://forums.phpfreaks.com/topic/118181-mysql-insert/#findComment-610368 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.