Members: 10,140
Threads: 38,830
Posts: 159,367
Online: 33

Newest Member: Xoote


Old 28.08.2004, 05:36   #1
almambo
Mamber
 
Join Date: May 2004
Location: Michigan
Posts: 60
almambo is on a distinguished road
Default Possible Error in RC1 SQL?

Using phpMyAdmin, I create the database and try to run the mambo SQL file (mambo.sql) for a fresh Mambo 4.5.1 RC1 install, I get the following error:

INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO CREATE TABLE `#__menu` (

`id` int( 11 ) NOT NULL auto_increment,
`menutype` varchar( 25 ) default NULL ,
`name` varchar( 100 ) default NULL ,
`link` text,
`type` varchar( 50 ) NOT NULL default '',
`published` tinyint( 1 ) NOT NULL default '0',
`parent` int( 11 ) unsigned NOT NULL default '0',
`componentid` int( 11 ) unsigned NOT NULL default '0',
`sublevel` int( 11 ) default '0',
`ordering` int( 11 ) default '0',
`checked_out` int( 11 ) unsigned NOT NULL default '0',
`checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
`pollid` int( 11 ) NOT NULL default '0',
`browserNav` tinyint( 4 ) default '0',
`access` tinyint( 3 ) unsigned NOT NULL default '0',
`utaccess` tinyint( 3 ) unsigned NOT NULL default '0',
`params` text NOT NULL ,
PRIMARY KEY ( `id` ) ,
KEY `componentid` ( `componentid` , `menutype` , `published` , `access` ) ,
KEY `menutype` ( `menutype` )
) TYPE = MYISAM

MySQL said:


You have an error in your SQL syntax near 'INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT I' at line 1


Afer investigating mambo.sql, I see the following in the file:
INSERT INTO #__mambots VALUES (1,'MOS Image','mosimage','content',0,-10000,1,1,0,0,'0000-00-00 00:00:00','');
INSERT INTO #__mambots VALUES (2,'MOS Pagination','mospaging','content',0,10000,1,1,0,0, '0000-00-00 00:00:00','');
INSERT INTO #__mambots VALUES (3,'Legacy Mambot Includer','legacybots','content',0,1,1,1,0,0,'0000-00-00 00:00:00','');
INSERT INTO #__mambots VALUES (4,'BB Code support','mosbbcode','content',0,2,1,0,0,0,'0000-00-00 00:00:00','');
INSERT INTO #__mambots VALUES (5,'SEF','mossef','content',0,3,1,0,0,0,'0000-00-00 00:00:00','');
INSERT INTO #__mambots VALUES (6,'MOS Rating','mosvote','content',0,4,1,1,0,0,'0000-00-00 00:00:00','');
INSERT INTO #__mambots VALUES (7,'Search Content','content.searchbot','search',0,1,1,1,0,0, '0000-00-00 00:00:00','');
INSERT INTO #__mambots VALUES (8,'Search Weblinks','weblinks.searchbot','search',0,2,1,1,0, 0,'0000-00-00 00:00:00','');
INSERT INTO #__mambots VALUES (9,'Code support','moscode','content',0,2,1,0,0,0,'0000-00-00 00:00:00','');

INSERT INTO #__mambots VALUES (10,'No Editor','none','editors',0,1,1,1,0,0,'0000-00-00 00:00:00','');
INSERT INTO #__mambots VALUES (11,'RTE Editor','rte','editors',0,2,1,0,0,0,'0000-00-00 00:00:00','');
INSERT INTO #__mambots VALUES (12,'TinyMCE Editor','tinymce','editors',0,2,1,0,0,0,'0000-00-00 00:00:00','');

# --------------------------------------------------------

#
# Table structure for table `#__menu`
#

As you can see, the quotes are missing in the Insert statements.
__________________
Arabic Mambo
almambo is offline   Reply With Quote
Sponsored Links
Old 28.08.2004, 05:44   #2
almambo
Mamber
 
Join Date: May 2004
Location: Michigan
Posts: 60
almambo is on a distinguished road
Default Re: Possible Error in RC1 SQL?

In case you encounter the same problem with mambo.sql, replace the INSERT statements at lines 347-359 with:
INSERT INTO `#__mambots` VALUES (1,'MOS Image','mosimage','content',0,-10000,1,1,0,0,'0000-00-00 00:00:00','');
INSERT INTO `#__mambots` VALUES (2,'MOS Pagination','mospaging','content',0,10000,1,1,0,0, '0000-00-00 00:00:00','');
INSERT INTO `#__mambots` VALUES (3,'Legacy Mambot Includer','legacybots','content',0,1,1,1,0,0,'0000-00-00 00:00:00','');
INSERT INTO `#__mambots` VALUES (4,'BB Code support','mosbbcode','content',0,2,1,0,0,0,'0000-00-00 00:00:00','');
INSERT INTO `#__mambots` VALUES (5,'SEF','mossef','content',0,3,1,0,0,0,'0000-00-00 00:00:00','');
INSERT INTO `#__mambots` VALUES (6,'MOS Rating','mosvote','content',0,4,1,1,0,0,'0000-00-00 00:00:00','');
INSERT INTO `#__mambots` VALUES (7,'Search Content','content.searchbot','search',0,1,1,1,0,0, '0000-00-00 00:00:00','');
INSERT INTO `#__mambots` VALUES (8,'Search Weblinks','weblinks.searchbot','search',0,2,1,1,0, 0,'0000-00-00 00:00:00','');
INSERT INTO `#__mambots` VALUES (9,'Code support','moscode','content',0,2,1,0,0,0,'0000-00-00 00:00:00','');

INSERT INTO `#__mambots` VALUES (10,'No Editor','none','editors',0,1,1,1,0,0,'0000-00-00 00:00:00','');
INSERT INTO `#__mambots` VALUES (11,'RTE Editor','rte','editors',0,2,1,0,0,0,'0000-00-00 00:00:00','');
INSERT INTO `#__mambots` VALUES (12,'TinyMCE Editor','tinymce','editors',0,2,1,0,0,0,'0000-00-00 00:00:00','');

This worked for me and I succeded in creating the database.
__________________
Arabic Mambo
almambo is offline   Reply With Quote
Old 28.08.2004, 10:15   #3
Se7eN
Mamber
 
Join Date: May 2004
Posts: 84
Se7eN is on a distinguished road
Default Re: Possible Error in RC1 SQL?

Same error exists in the sample data file (sample_data.sql)

change :
UPDATE #__categories SET count=5 WHERE id=1;
into
UPDATE `#__categories` SET count=5 WHERE id=1;
and you're set.

Se7eN
Se7eN is offline   Reply With Quote
Old 28.08.2004, 12:19   #4
mgerrard
Senior Mamber
 
Join Date: Jun 2004
Posts: 159
mgerrard is on a distinguished road
Default Re: Possible Error in RC1 SQL?

I'm a bit confused. If you do a manual install of the DB are you supposed to replace the #_ with mos or whatever you want as a table prefix? I can't get the sql to run without getting rid of the # (it probably automatically replaces it in the auto installation)
mgerrard is offline   Reply With Quote
Old 28.08.2004, 12:58   #5
SvenErik
Senior Mamber
 
SvenErik's Avatar
 
Join Date: Apr 2004
Location: Mo i Rana, Norway (66°19'N 14°09'E)
Posts: 214
SvenErik is on a distinguished road
Default Re: Possible Error in RC1 SQL?

Yes, you have to change the #__ into the tableprefix you choose, usually it is mos_ . The DB file is meant to be used by the installer and it will change the #__ prefix based on your choice during installation. I guess it would be easier if they had included a /sql folder in the root with DB files meant for manual installation in addition to the /installation/sql folder meant for the installer.
__________________
"Every demand is a prison, and wisdom is only free when it asks nothing."
Sir Bertrand Russell
SvenErik is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
451 b4 localhost clean inst. SQL error.help? twerp Mambo 4.5.1 Installation and Upgrades 2 19.08.2004 04:33
sql error, please help twistedrhymes Component Development 1 12.07.2004 14:14
sql syntax errors & locked out of own site mrblow Mambo 4.5 Installation and Upgrades 3 29.06.2004 11:49
setting frontpage items to 10 ends in sql error doggystyle Mambo 4.5 General Talk 0 22.05.2004 14:02


All times are GMT +2. The time now is 23:22.

Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.