techker Posted April 4, 2007 Share Posted April 4, 2007 hey guys i got this when installing a script..i can't seem to find the probleme? <!-- Database error in SunShop Installer: Invalid SQL: CREATE TABLE options ( title VARCHAR(100), hometitle VARCHAR(100), shopurl VARCHAR(100), homeurl VARCHAR(100), securepath VARCHAR(100), companyname VARCHAR(100), address TEXT, city VARCHAR(30), state VARCHAR(20), zip VARCHAR(20), country VARCHAR(30), phone VARCHAR(20), faxnumber VARCHAR(20), contactemail VARCHAR(100), taxrate VARCHAR(10), shipups VARCHAR(5), grnd VARCHAR(5), nextdayair VARCHAR(5), seconddayair VARCHAR(5), threeday VARCHAR(5), canada VARCHAR(5), worldwidex VARCHAR(5), worldwidexplus VARCHAR(5), fixedshipping VARCHAR(5), method VARCHAR(15), rate VARCHAR(20), productpath VARCHAR(50), catimage VARCHAR(50), catopen VARCHAR(50), viewcartimage VARCHAR(50), viewaccountimage VARCHAR(50), checkoutimage VARCHAR(50), helpimage VARCHAR(50), cartimage VARCHAR(50), tablehead VARCHAR(50), tableheadtext VARCHAR(50), tableborder VARCHAR(50), tablebg VARCHAR(50), shipchart VARCHAR(50), ship1p1 VARCHAR(50), ship1us VARCHAR(50), ship1ca VARCHAR(50), ship2 VARCHAR(50), ship2p1 VARCHAR(50), ship2p2 VARCHAR(50), ship2us VARCHAR(50), ship2ca VARCHAR(50), ship3 VARCHAR(50), ship3p1 VARCHAR(50), ship3p2 VARCHAR(50), ship3us VARCHAR(50), ship3ca VARCHAR(50), ship4p1 VARCHAR(50), ship4us VARCHAR(50), ship4ca VARCHAR(50), visa VARCHAR(50), mastercard VARCHAR(50), discover VARCHAR(50), amex VARCHAR(50), check VARCHAR(50), fax VARCHAR(50), moneyorder VARCHAR(50), cc VARCHAR(50), payable VARCHAR(100), paypal VARCHAR(50), paypalemail VARCHAR(100), shopimage VARCHAR(100), centerborder VARCHAR(50), centerheader VARCHAR(50), centercolor VARCHAR(50), centerfont VARCHAR(50), centerbg VARCHAR(50), useheader VARCHAR(50), usefooter VARCHAR(50), myheader VARCHAR(50), myfooter VARCHAR(50), thumbheight VARCHAR(50), thumbwidth VARCHAR(50), picheight VARCHAR(50), picwidth VARCHAR(50), showstock VARCHAR(50), showitem VARCHAR(50), showintro VARCHAR(50), orderby VARCHAR(50), outofstock VARCHAR(50), cs VARCHAR(5), po VARCHAR(5), license VARCHAR(50), handling VARCHAR(20), imagel VARCHAR(1), showbestsellers varchar(5), showspecials varchar(5), language varchar(20), showcattotals varchar(5), shipcalc varchar(5), shipusps varchar(5), itemsperpage int(5), usesecurefooter varchar(5), mysecurefooter varchar(50), usesecureheader varchar(5), mysecureheader varchar(50), mustsignup varchar(5), uspsserver varchar(200), uspsuser varchar(100), uspspass varchar(100), catsdisplay VARCHAR(10), allwidth VARCHAR(10), centerwidth VARCHAR(10), tablewidth VARCHAR(10) ) mysql error: 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 'VARCHAR(50), fax VARCHAR(50), moneyorder VARCHAR(50), cc VARCHAR(' at line 61 mysql error number: 1064 Quote Link to comment https://forums.phpfreaks.com/topic/45534-error-i-cant-find/ Share on other sites More sharing options...
AndyB Posted April 4, 2007 Share Posted April 4, 2007 http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html check is a reserved word and cannot be used as a field name. Change it to something that isn't reserved (or wrap it with `backticks`) Quote Link to comment https://forums.phpfreaks.com/topic/45534-error-i-cant-find/#findComment-221052 Share on other sites More sharing options...
techker Posted April 4, 2007 Author Share Posted April 4, 2007 so if i change these words will it mess up my script? Quote Link to comment https://forums.phpfreaks.com/topic/45534-error-i-cant-find/#findComment-221055 Share on other sites More sharing options...
techker Posted April 4, 2007 Author Share Posted April 4, 2007 so i looked at the page and i can't find any words on my sql? its says on line fax VARCHAR(50), moneyorder VARCHAR(50), cc VARCHAR(50), so basicly i wold have to `fax` and `cc`? maybe http://www.mysql.com/news-and-events/newsletter/2002-10/a0000000075.html Quote Link to comment https://forums.phpfreaks.com/topic/45534-error-i-cant-find/#findComment-221059 Share on other sites More sharing options...
AndyB Posted April 4, 2007 Share Posted April 4, 2007 No. The problem is the word check. It's a reserved word. You could change it to x_check, or use backticks around it, i.e. `check` Quote Link to comment https://forums.phpfreaks.com/topic/45534-error-i-cant-find/#findComment-221065 Share on other sites More sharing options...
techker Posted April 4, 2007 Author Share Posted April 4, 2007 lol i have been looking at that work for about 10 minutes now and i new something was wrong with it..and even and i got the confirmation in anather forum to. now if i rename it to x_check will it have any concequence's to my script? and another guy told me to need to normalize that table what does he mean? what about this? fax VARCHAR(50), moneyorder VARCHAR(50), cc VARCHAR(' at line 61 mysql error number: 1064 Quote Link to comment https://forums.phpfreaks.com/topic/45534-error-i-cant-find/#findComment-221071 Share on other sites More sharing options...
fenway Posted April 4, 2007 Share Posted April 4, 2007 You have way too many columns. Quote Link to comment https://forums.phpfreaks.com/topic/45534-error-i-cant-find/#findComment-221228 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.