clmurray Posted May 3, 2009 Share Posted May 3, 2009 OK guys...im new to the world of php scripts...so be gentle...im sure this is something simple...but here goes. Im trying to install this classified script on godaddy...and i get this error when doing the insert to create the tables and such... php5 host config 2.1 Error SQL query: -- -- Dumping data for table `classifieds` -- INSERT INTO `classifieds` (`adid`, `title`, `description`, `cat`, `price`, `name`, `number`, `email`, `password`, `picture`, `date`, `views`, `authorized`) VALUES (1, 'Alpha Bravo Charlie', 'First Ad Listing. Default Admin Username and Password are User: admin password: password.The management area can be found at /manager/ ', 1, 22, 'Sell Name', '555-555-5555', 'some@email.com', '', 'images/noimage.jpg', '2009-03-04 00:00:00', 66, 1), -- -------------------------------------------------------- -- -- Table structure for table `myuser` -- CREATE TABLE IF NOT EXISTS `myuser` ( `ID` int(10) unsigned NOT NULL auto_increment, `userName` char(50) character set utf8 collate utf8_bin default NULL, `userPass` char(50) character set utf8 collate utf8_bin default NULL, `isAdmin` tinyint(2) NOT NULL default '-1', `userGroup` int(10) unsigned default '1', `sessionID` char(50) collate utf8_unicode_ci default NULL, [...] MySQL said: Documentation #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 'CREATE TABLE IF NOT EXISTS `myuser` ( `ID` int(10) unsigned NOT NULL auto_inc' at line 6 Here is the insert file... -- phpMyAdmin SQL Dump -- version 2.11.9.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 03, 2009 at 04:16 PM -- Server version: 5.0.67 -- PHP Version: 5.2.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Database: `rcoders_classifieds` -- -- -------------------------------------------------------- -- -- Table structure for table `categories` -- CREATE TABLE IF NOT EXISTS `categories` ( `id` int(255) NOT NULL auto_increment, `name` text collate utf8_unicode_ci NOT NULL, `sub` int(2) NOT NULL default '0', `parent` int(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=27 ; -- -- Dumping data for table `categories` -- INSERT INTO `categories` (`id`, `name`, `sub`, `parent`) VALUES (1, 'Announcements', 0, 0), (2, 'Bids Wanted', 0, 0), (3, 'Employment', 0, 0), (4, 'Items For Sale', 0, 0), (5, 'Real Estate for Rent', 0, 0), (6, 'Real Estate For Sale', 0, 0), (7, 'Services', 0, 0), (8, 'Garage Sales', 0, 0), (9, 'Found And Free', 0, 0), (10, 'Automobiles', 0, 0), (11, 'Recreational Vehicles', 0, 0), (12, 'Wanted To Buy', 0, 0), (20, 'test', 1, 1), (21, 'test 2', 1, 1), (22, 'test 3', 1, 1), (23, 'test 4', 1, 1), (24, 'test 5', 1, 1), (25, 'test 6', 1, 1), (26, 'test 2 2', 1, 21); -- -------------------------------------------------------- -- -- Table structure for table `classifieds` -- CREATE TABLE IF NOT EXISTS `classifieds` ( `adid` int(255) NOT NULL auto_increment, `title` text collate utf8_unicode_ci NOT NULL, `description` text collate utf8_unicode_ci NOT NULL, `cat` int(10) NOT NULL, `price` int(10) NOT NULL, `name` text collate utf8_unicode_ci NOT NULL, `number` text collate utf8_unicode_ci NOT NULL, `email` text collate utf8_unicode_ci NOT NULL, `password` text collate utf8_unicode_ci NOT NULL, `picture` text collate utf8_unicode_ci NOT NULL, `date` timestamp NOT NULL default CURRENT_TIMESTAMP, `views` int(255) NOT NULL, `authorized` int(10) NOT NULL default '0', PRIMARY KEY (`adid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=83 ; -- -- Dumping data for table `classifieds` -- INSERT INTO `classifieds` (`adid`, `title`, `description`, `cat`, `price`, `name`, `number`, `email`, `password`, `picture`, `date`, `views`, `authorized`) VALUES (1, 'Alpha Bravo Charlie', 'First Ad Listing. Default Admin Username and Password are User: admin password: password.The management area can be found at /manager/ ', 1, 22, 'Sell Name', '555-555-5555', 'some@email.com', '', 'images/noimage.jpg', '2009-03-04 00:00:00', 66, 1), -- -------------------------------------------------------- -- -- Table structure for table `myuser` -- CREATE TABLE IF NOT EXISTS `myuser` ( `ID` int(10) NOT NULL auto_increment, `userName` char(50) character set utf8 collate utf8_bin default NULL, `userPass` char(50) character set utf8 collate utf8_bin default NULL, `isAdmin` tinyint(2) NOT NULL default '-1', `userGroup` int(10) unsigned default '1', `sessionID` char(50) collate utf8_unicode_ci default NULL, `lastLog` datetime default NULL, `userRemark` char(255) collate utf8_unicode_ci default NULL, PRIMARY KEY (`ID`), UNIQUE KEY `userName` (`userName`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Created by the AdminPro Class MySQL Setup ' AUTO_INCREMENT=10 ; -- -- Dumping data for table `myuser` -- INSERT INTO `myuser` (`ID`, `userName`, `userPass`, `isAdmin`, `userGroup`, `sessionID`, `lastLog`, `userRemark`) VALUES (1, 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 1, 1, 'b051fc6f339d333c2ee5ec1c276516fa', '2009-04-03 15:20:44', 'Administrator'), -- -------------------------------------------------------- -- -- Table structure for table `settings` -- CREATE TABLE IF NOT EXISTS `settings` ( `id` int(255) NOT NULL auto_increment, `sitename` text collate utf8_unicode_ci NOT NULL, `keywords` text collate utf8_unicode_ci NOT NULL, `description` text collate utf8_unicode_ci NOT NULL, `block1` text collate utf8_unicode_ci NOT NULL, `block2` text collate utf8_unicode_ci NOT NULL, `block3` text collate utf8_unicode_ci NOT NULL, `block4` text collate utf8_unicode_ci NOT NULL, `block5` text collate utf8_unicode_ci NOT NULL, `block6` text collate utf8_unicode_ci NOT NULL, `block7` text collate utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; -- -- Dumping data for table `settings` -- INSERT INTO `settings` (`id`, `sitename`, `keywords`, `description`, `block1`, `block2`, `block3`, `block4`, `block5`, `block6`, `block7`) VALUES (1, 'Classifieds Ads', 'Classified, Ads', 'Classified Ads Website', '<script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* classifieds-right */\r\ngoogle_ad_slot = "3482043982";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n//-->\r\n</script>\r\n<script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n</script>', '<script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* classifieds-right */\r\ngoogle_ad_slot = "3482043982";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n//-->\r\n</script>\r\n<script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n</script>', '<div align="center">\r\n <script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* Classifieds-top */\r\ngoogle_ad_slot = "7819033564";\r\ngoogle_ad_width = 180;\r\ngoogle_ad_height = 150;\r\n//-->\r\n </script>\r\n <script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n </script>\r\n <!-- End: AdBrite -->\r\n </div>', '<div align="center"><script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* Classifieds-sell-page */\r\ngoogle_ad_slot = "1051956347";\r\ngoogle_ad_width = 200;\r\ngoogle_ad_height = 200;\r\n//-->\r\n</script>\r\n<script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n</script></div>', '<script type='text/javascript'><!--\r\ngoogle_ad_client = 'pub-5995434485696039';\r\n/* 200x90, class-details-right */\r\ngoogle_ad_slot = '9671201816';\r\ngoogle_ad_width = 200;\r\ngoogle_ad_height = 90;\r\n//-->\r\n</script>\r\n<script type='text/javascript'\r\nsrc='http://pagead2.googlesyndication.com/pagead/show_ads.js'>\r\n</script> ', '<div align="center"><script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* 468x15, class-details-inside */\r\ngoogle_ad_slot = "5876948639";\r\ngoogle_ad_width = 468;\r\ngoogle_ad_height = 15;\r\n//-->\r\n</script>\r\n<script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n</script></div>', '<div align="center"><script type="text/javascript"><!--\r\ngoogle_ad_client = "pub-5995434485696039";\r\n/* 468x15, class-details-inside */\r\ngoogle_ad_slot = "5876948639";\r\ngoogle_ad_width = 468;\r\ngoogle_ad_height = 15;\r\n//-->\r\n</script>\r\n<script type="text/javascript"\r\nsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r\n</script></div>'); Any help would be greatly appreciated!! Quote Link to comment https://forums.phpfreaks.com/topic/156669-syntax-error/ Share on other sites More sharing options...
fenway Posted May 4, 2009 Share Posted May 4, 2009 Yes... you didn't specify a column type for the UID field. Quote Link to comment https://forums.phpfreaks.com/topic/156669-syntax-error/#findComment-826108 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.