News:

Help keep this project going by donating or buying adseller pro

Main Menu
Coinbase

SQL Query not installing?

Started by vitalik82, May 03, 2009, 01:04:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vitalik82

Hello! I am running 2.0 RC1.

I try to install the mod manually. And it is ok until I get to the

Code
install.php
This file should not be able to execute standalone. You may have to run the following queries manually.

And 2 Queries:

CREATE TABLE IF NOT EXISTS {db_prefix}ads (
ADS_ID mediumint(8) unsigned NOT NULL auto_increment,
NAME tinytext NOT NULL,
CONTENT text NOT NULL,
BOARDS tinytext,
POSTS tinytext,
HITS mediumint(8) NOT NULL default '0',
TYPE smallint(4) NOT NULL default '0',
show_index smallint(4) NOT NULL default '0',
show_board smallint(4) NOT NULL default '0',
show_threadindex smallint(4) NOT NULL default '0',
show_lastpost smallint(4) NOT NULL default '0',
show_thread smallint(4) NOT NULL default '0',
show_bottom smallint(4) NOT NULL default '0',
show_welcome smallint(4) NOT NULL default '0',
show_topofpage smallint(4) NOT NULL default '0',
show_towerright smallint(4) NOT NULL default '0',
show_towerleft smallint(4) NOT NULL default '0',
show_betweencategories smallint(4) NOT NULL default '0',
show_underchildren smallint(4) NOT NULL default '0

INSERT IGNORE INTO {db_prefix}settings
(variable, value)
VALUES ('ads_displayAdsAdmin', '0'),
('ads_updateReports', '0'),
('ads_quickDisable', '0'),
('ads_lookLikePosts



I understood it so that I need to make a table in the DB. But when I copy the Queries to phpMyAdmin it returns me an error.

ccbtimewiz

Are you replacing {db_prefix} with your db_prefix?

vitalik82

Quote from: ccbtimewiz on May 03, 2009, 09:01:39 PM
Are you replacing {db_prefix} with your db_prefix?

Yes:

ERROR: Незакрытая кавычка @ 832
STR: '
SQL: CREATE TABLE IF NOT EXISTS  smf_ads (
ADS_ID mediumint(8) unsigned NOT NULL auto_increment,
NAME tinytext NOT NULL,
CONTENT text NOT NULL,
BOARDS tinytext,
POSTS tinytext,
HITS mediumint(8) NOT NULL default '0',
TYPE smallint(4) NOT NULL default '0',
show_index smallint(4) NOT NULL default '0',
show_board smallint(4) NOT NULL default '0',
show_threadindex smallint(4) NOT NULL default '0',
show_lastpost smallint(4) NOT NULL default '0',
show_thread smallint(4) NOT NULL default '0',
show_bottom smallint(4) NOT NULL default '0',
show_welcome smallint(4) NOT NULL default '0',
show_topofpage smallint(4) NOT NULL default '0',
show_towerright smallint(4) NOT NULL default '0',
show_towerleft smallint(4) NOT NULL default '0',
show_betweencategories smallint(4) NOT NULL default '0',
show_underchildren smallint(4) NOT NULL default '0

SQL-запрос : 

CREATE TABLE IF NOT EXISTS smf_ads ( ADS_ID mediumint(8) unsigned NOT NULL auto_increment, NAME tinytext NOT NULL, CONTENT text NOT NULL, BOARDS tinytext, POSTS tinytext, HITS mediumint(8) NOT NULL default '0', TYPE smallint(4) NOT NULL default '0', show_index smallint(4) NOT NULL default '0', show_board smallint(4) NOT NULL default '0', show_threadindex smallint(4) NOT NULL default '0', show_lastpost smallint(4) NOT NULL default '0', show_thread smallint(4) NOT NULL default '0', show_bottom smallint(4) NOT NULL default '0', show_welcome smallint(4) NOT NULL default '0', show_topofpage smallint(4) NOT NULL default '0', show_towerright smallint(4) NOT NULL default '0', show_towerleft smallint(4) NOT NULL default '0', show_betweencategories smallint(4) NOT NULL default '0', show_underchildren smallint(4) NOT NULL default '0

Ответ MySQL:
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 ''0' at line 20