Ошибка 1064

Список разделов phpBBex 1.x (поддерживается) Поддержка 1.x

Описание: У вас проблемы с phpBBex 1.x и вам необходима помощь? Спрашивайте здесь!
Правила раздела: Одна тема — один вопрос или группа связанных вопросов. Обязательно формируйте внятный заголовок, максимально отражающий суть вопроса. Подробно описывайте проблему. Не забудьте указать версию phpBBex и какие моды установлены, по возможности добавьте скриншоты проблемы или ссылку на страницу с проблемой.
Модератор: Поддержка

Сообщение #1 andrei » 27.02.2013, 08:58

Добрый день! Хотел перенести форум с хостинга на localhost, скопировал папки, сделал экспорт базы данных, но когда на компьютере запустил phpmyadmin и попытался сделать импорт базы данных выдало вот такую ошибку:
SQL запрос:
Код: Выделить всё
INSERT INTO u612012817_styles_theme (theme_id, theme_name, theme_copyright, theme_path, theme_storedb, theme_mtime, theme_data) VALUES (1, 'prosilver', '© phpBB Group', 'prosilver', 1, 1359399033, '/* phpBB3 Style Sheet\n --------------------------------------------------------------\n   Style name:    prosilver (the default phpBB 3.0.x style)\n   Based on style:    \n   Original author:   Tom Beddard ( http://www.subblue.com/ )\n   Modified by:    phpBB Group ( http://www.phpbb.com/ )\n --------------------------------------------------------------\n*/\n\n/* General Markup Styles\n---------------------------------------- */\n\n* {\n   /* Reset browsers default margin, padding and font sizes */\n margin: 0;\n   padding: 0;\n}\n\nhtml {\n   font-size: 100%;\n   /* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-IE browsers */\n   height: 100%;\n   overflow-y: scroll;\n}\n\nbody {\n   /* Text-Sizing with ems: http://www.clagnut.com/blog/348/ */\n   font-family: Ve[...]
Ответ MySQL:
Код: Выделить всё
#1153 - Got a packet bigger than 'max_allowed_packet' bytes
Через Гугл я мигом нашёл как устранить такую неисправность, самый распространённый ответ в сети по этой проблеме
"Редактируем файл /etc/my.cnf и изменяем параметр max_allowed_packet"
Но проблема в том, что ни папки "etc", ни, тем более файла "my.cnf" в моём MySQL, что на моём компе установлен нет, я все папки в MySQL облазил, ничего так и не нашёл! Есть только файл конфигурации my.ini - но и там нет параметра "max_allowed_packet" ! Версия MySQL(i) 5.5.25a. Подскажите пожалуйста как можно увеличить значение параметра "max_allowed_packet"?
Последний раз редактировалось andrei 28.02.2013, 18:44, всего редактировалось 1 раз.
andrei M
Автор темы
Репутация: 1
С нами: 11 лет 2 месяца

Сообщение #2 VEG » 27.02.2013, 10:52

andrei, под Windows файл my.cnf называется my.ini. Если там нет нужного параметра — добавьте его сами.
VEG M
Администратор
Аватара
Откуда: Finland
Репутация: 1653
С нами: 11 лет 11 месяцев

Сообщение #3 andrei » 27.02.2013, 12:28

VEG, Проблему с "max_allowed_packet" я решил частично, теперь выскакивает такая ошибка:
SQL-запрос:
-- База данных: `u612012817_mysql`
-- Структура таблицы `columns_priv`
Код: Выделить всё
CREATE TABLE IF NOT EXISTS  `columns_priv` (

 `Host` CHAR( 60 ) BINARY NOT NULL DEFAULT  '',
 `Db` CHAR( 64 ) BINARY NOT NULL DEFAULT  '',
 `User` CHAR( 16 ) BINARY NOT NULL DEFAULT  '',
 `Table_name` CHAR( 64 ) BINARY NOT NULL DEFAULT  '',
 `Column_name` CHAR( 64 ) BINARY NOT NULL DEFAULT  '',
 `Timestamp` TIMESTAMP NOT NULL ,
 `Column_priv` SET(  'Select',  'Insert',  'Update',  'References' ) NOT NULL DEFAULT  '',
PRIMARY KEY (  `Host` ,  `Db` ,  `User` ,  `Table_name` ,  `Column_name` )
) TYPE = MYISAM COMMENT =  'Column privileges';
Ответ MySQL:
Код: Выделить всё
#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 'TYPE=MyISAM COMMENT='Column privileges'' at line 20
Ничего не понимаю... Я же когда делал экспорт бд форума на хостинге отметил все таблицы какие там были! Если, ошибка, как я понял в том что таблица `columns_priv` не создана или не существует, то как же тогда форум прекрасно работал(и прекрасно работает и без этой таблицы) на хостинге? И как теперь решить проблему?
andrei M
Автор темы
Репутация: 1
С нами: 11 лет 2 месяца

Сообщение #4 VEG » 27.02.2013, 12:30

Вообще это не похоже на кусок дампа базы phpBBex :) Судя по всему это таблица другого скрипта.
Замените эту часть на знак «;»:
Код: Выделить всё
 TYPE = MYISAM COMMENT =  'Column privileges';
VEG M
Администратор
Аватара
Откуда: Finland
Репутация: 1653
С нами: 11 лет 11 месяцев

Сообщение #5 andrei » 27.02.2013, 13:37

VEG, Почти ничего не изменилось, вот что вышло после того как я поменял знак:
Код: Выделить всё
-- Структура таблицы `columns_priv`
--
CREATE TABLE IF NOT EXISTS  `columns_priv` (

 `Host` CHAR( 60 ) BINARY NOT NULL DEFAULT  '',
 `Db` CHAR( 64 ) BINARY NOT NULL DEFAULT  '',
 `User` CHAR( 16 ) BINARY NOT NULL DEFAULT  '',
 `Table_name` CHAR( 64 ) BINARY NOT NULL DEFAULT  '',
 `Column_name` CHAR( 64 ) BINARY NOT NULL DEFAULT  '',
 `Timestamp` TIMESTAMP NOT NULL ,
 `Column_priv` SET(  'Select',  'Insert',  'Update',  'References' ) NOT NULL DEFAULT  '',
PRIMARY KEY (  `Host` ,  `Db` ,  `User` ,  `Table_name` ,  `Column_name` )
) TYPE = MYISAM COMMENT =  'Column privileges' : -- --------------------------------------------------------
--
-- Структура таблицы `db`
--
CREATE TABLE IF NOT EXISTS  `db` (
 `Host` CHAR( 60 ) BINARY NOT NULL DEFAULT  '',
 `Db` CHAR( 64 ) BINARY NOT NULL DEFAULT  '',
 `User` CHAR( 16 ) BINARY NOT NULL DEFAULT  '',
 `Select_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Insert_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Update_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Delete_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Create_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Drop_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Grant_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `References_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Index_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Alter_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Create_tmp_table_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Lock_tables_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Create_view_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Show_view_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Create_routine_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Alter_routine_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Execute_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Event_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
 `Trigger_priv` ENUM(  'N',  'Y' ) NOT NULL DEFAULT  'N',
PRIMARY KEY (  `Host` ,  `Db` ,  `User` ) ,
KEY  `User` (  `User` )
) TYPE = MYISAM COMMENT =  'Database privileges';

Ответ MySQL:

#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 'TYPE=MyISAM COMMENT='Column privileges':

-- -----------------------------------' at line 20
Видно что в итоге ответ сервера остался таким же. А как это
VEG:Судя по всему это таблица другого скрипта

может такое быть я ума не приложу, я делал дамп бд со своего форума, не с чужого...
andrei M
Автор темы
Репутация: 1
С нами: 11 лет 2 месяца

Сообщение #6 VEG » 27.02.2013, 14:02

andrei, нужно было просто удалить этот кусок текста. А в конце инструкции должен стоять знак «точка с запятой».

Добавлено спустя 1 минуту 3 секунды:
Все таблицы phpBBex по умолчанию начинаются с phpbb_. Всё остальное, очевидно, осталось от чего-то другого. Если вам эти таблицы не нужны — можете их не импортировать. Для phpBBex они точно не нужны.
VEG M
Администратор
Аватара
Откуда: Finland
Репутация: 1653
С нами: 11 лет 11 месяцев

Сообщение #7 andrei » 27.02.2013, 14:47

Спасибо, помогло в принципе, но стали выскакивать похожие ошибки и с другими таблицами... Сейчас вручную удаляю в конце таблиц все строчки с "TYPE=MyISAM ........" и оставляю только ";" - Все таблицы изменённые таким вот образом импортируются, остальные - нет. Придётся видимо вручную обрабатывать все 92 таблицы...
andrei M
Автор темы
Репутация: 1
С нами: 11 лет 2 месяца

Сообщение #8 andrei » 28.02.2013, 18:42

andrei:помогло в принципе, но стали выскакивать похожие ошибки и с другими таблицами... Сейчас вручную удаляю в конце таблиц все строчки с "TYPE=MyISAM ........" и оставляю только ";" - Все таблицы изменённые таким вот образом импортируются, остальные - нет. Придётся видимо вручную обрабатывать все 92 таблицы...
Проблема так и не решена по прежнему, чуть ли не 3 суток на это угробил, но и на 1% не приблизился к решению! Вывод такой к сожалению: если в phpbbex встроены какие-то подозрительные моды или слишком много пользовательских бибикодов, или ещё что-то "лишнее"(кроме самого phpbbex в своём "чистом виде") импорт бд вообще не работает! Проверял несколько раз, простейшим способом - делал экспорт бд форума на локалхосте, создавал новую бд, пытался сделать импорт в эту новую бд - безуспешно... Из модов у меня установлен только "enable HTML", причём совсем недавно, думаю вся причина именно в нём. Кто столкнулся с подобной проблемой и сумел решить её очень прошу помочь! :help:
#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 'TYPE=MyISAM COMMENT='тут идут названия таблиц - все сколько их есть!' at line (номер строки)
phpbbex 1.5.3; MySQL 5.5.25a; Apache 2.2.22; PHP 5.3.14; phpMyAdmin 3.5.1

Добавлено спустя 22 минуты 56 секунд:
Самый распространённый совет который встречался мне на форумах выглядит так примерно:
"TYPE=MyISAM" needs to be changed to "ENGINE=MyISAM".
Т.е. "TYPE" нужно заменить на "ENGINE", как я понял. Но как и где это сделать? Я имею ввиду - не вручную править каждую таблицу, а какой глобальный SQL запрос нужно для этого сделать? Или ещё лучше - где прописать этот параметр "ENGINE", чтобы раз и навсегда решить эту проблему?
andrei M
Автор темы
Репутация: 1
С нами: 11 лет 2 месяца

Сообщение #9 VEG » 28.02.2013, 19:51

phpBBex тут не при чём. Вы просто пользуетесь каким-то кривым дампером, который делает некорректные дампы. Вот и вся проблема. Пользуйтесь штатным дампером — он должен создавать корректные файлы:
Код: Выделить всё
mysqldump -c --user="root" --password="qwerty" --host="localhost" yourdb > dump.sql
Замените в этой команде имя пользователя, пароль, хост и имя базы на вашу — эта команда сделает дамп в файл dump.sql.
VEG M
Администратор
Аватара
Откуда: Finland
Репутация: 1653
С нами: 11 лет 11 месяцев

Сообщение #10 andrei » 28.02.2013, 20:33

VEG, Я понял так, что надо заменить то что в кавычках на свои значения, и сделать SQL-запрос, так? Вот что выдаёт:
Код: Выделить всё
#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 'mysqldump -c --user="root" --password="******" --host="localhost" u612012817_mysql' at line 1
То же самое получается если использовать другой вариант замены данных
Код: Выделить всё
mysqldump -c --"root" --"*****" --"localhost" u612012817_mysql > dump.sql

Выдаёт:
Код: Выделить всё
#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 'mysqldump -c --"root" --"*****" --"localhost" u612012817_mysql > dump.sql' at line 1
root и localhost - это и есть мои данные, пароль свой ставил, разумеется, и название бд. Вот только ещё без кавычек не пробовал, нешто и так попробовать... Или я вообще всё неправильно понял?
Вот так ещё попробовал, без кавычек:
Код: Выделить всё
mysqldump -c --user=root --password=****** --host=localhost u612012817_mysql > dump.sql
Результат:
Код: Выделить всё
#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 'mysqldump -c --user=root --password=***** --host=localhost u612012817_mysql > dum' at line 1
andrei M
Автор темы
Репутация: 1
С нами: 11 лет 2 месяца

Сообщение #11 VEG » 28.02.2013, 21:24

andrei, это не SQL, это команда для командной строки. Запускаете консоль и вводите это там.
VEG M
Администратор
Аватара
Откуда: Finland
Репутация: 1653
С нами: 11 лет 11 месяцев

Сообщение #12 andrei » 28.02.2013, 22:14

VEG, Судя по всему команда сработала успешно
Код: Выделить всё
mysqldump -c --user="root" --password="*****" --host="localhost" u612012817_mysql > dump.sql
- вот в таком формате её вводил. Только нет нигде этого файла - dump.sql - ни в одной из папок MySQL, ни в папке forum(также все подпапки облазил!), вообще нигде! Он где вообще должен находиться?
-----------------------------------------------------
Всё, нашёл. Щас пробую сделать импорт, напишу как получилось

Добавлено спустя 31 минуту 40 секунд:
VEG, Всё прекрасно работает! :clap: Спасибо огромное! Только я всё равно не совсем понял вот это:
VEG:Вы просто пользуетесь каким-то кривым дампером, который делает некорректные дампы. Пользуйтесь штатным дампером — он должен создавать корректные файлы
Я, честно сказать, даже был не в курсе, что существуют ещё какие-то альтернативные дамперы кроме "штатного" который, как я раньше думал, находится в составе phpmyadmin... Так что же, выходит он никакой не "штатный дампер", а просто красивая и бесполезная штучка, которая только вред приносит? Однако... :oops: Последний вопрос - а что, точно таким же образом можно и с хостинга делать дамп бд? Т.е. - команда та же самая, только вместо локалхост указывается адрес хоста, я правильно понял?
andrei M
Автор темы
Репутация: 1
С нами: 11 лет 2 месяца

Сообщение #13 VEG » 28.02.2013, 23:11

andrei:Он где вообще должен находиться?
Он должен размещаться в том каталоге, в котором вы запускали команду mysqldump.
andrei:Последний вопрос - а что, точно таким же образом можно и с хостинга делать дамп бд?
Подключаетесь к вашему серверу по SSH (это по сути удалённая командная строка) и выполняете там эту команду.
andrei:phpmyadmin
Это совершенно левая разработка. Официально для MySQL распространяются набор консольных утилит (mysql и mysqldump) и несколько программ с графическим интерфейсом (я, например, использую MySQL Query Browser).
VEG M
Администратор
Аватара
Откуда: Finland
Репутация: 1653
С нами: 11 лет 11 месяцев

Сообщение #14 ден » 25.07.2013, 09:59

Код: Выделить всё
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS Country;
#
#  Table structure for Countries table
#
CREATE TABLE Country(
      country_code             char(2) not null,
      country_name             varchar(60) not null,
      primary key(country_code)
)type=innodb DEFAULT CHARACTER SET utf8   COLLATE utf8_general_ci;
#
#  Table structure for Users table
#
CREATE TABLE users(
      pk_user                int unsigned not null auto_increment,
      email                   varchar(120) not null,
      flname                   varchar(100) not null,
      password                varchar(64) not null,
      country_code            char(2) not null,
      usr_ip                      varchar(15),
      usr_nmb_logins             int(10) unsigned not null default 0,
      usr_signup_date          timestamp not null default CURRENT_TIMESTAMP,
      usr_userid                varchar(32),
      usr_confirm_hash          varchar(255) not null,               # for the account confirmation
      usr_is_confirmed          tinyint(1) not null default 0,          # after confirming its set to 1
      usr_resetpassword_hash      varchar(255) not null,               # when the user resets password (forgot password)
      usr_is_blocked           tinyint(1) not null default 0,          # blocked or not
      usr_is_admin             tinyint(1) not null default 0,          # admin or not
      foreign key(country_code)    references Country(country_code),
      unique index(email),
      primary key(pk_user)
)type=innodb DEFAULT CHARACTER SET utf8   COLLATE utf8_general_ci;

/*ADMIN*/
/*you should manually set usr_is_admin to 1 in case you want your user to be admin*/

insert into Country(country_code,country_name) values("n","?");
insert into Country(country_code,country_name) values("ad","Andorra");
insert into Country(country_code,country_name) values("ae","United Arab Emirates");
insert into Country(country_code,country_name) values("af","Afghanistan");
insert into Country(country_code,country_name) values("ag","Antigua and Barbuda");
insert into Country(country_code,country_name) values("ai","Anguilla");
insert into Country(country_code,country_name) values("al","Albania");
insert into Country(country_code,country_name) values("am","Armenia");
insert into Country(country_code,country_name) values("an","Netherlands Antilles");
insert into Country(country_code,country_name) values("ao","Angola");
insert into Country(country_code,country_name) values("ap","Asia/Pacific Region");
insert into Country(country_code,country_name) values("aq","Antarctica");
insert into Country(country_code,country_name) values("ar","Argentina");
insert into Country(country_code,country_name) values("as","American Samoa");
insert into Country(country_code,country_name) values("at","Austria");
insert into Country(country_code,country_name) values("au","Australia");
insert into Country(country_code,country_name) values("aw","Aruba");
insert into Country(country_code,country_name) values("ax","Aland Islands");
insert into Country(country_code,country_name) values("az","Azerbaijan");
insert into Country(country_code,country_name) values("ba","Bosnia and Herzegovina");
insert into Country(country_code,country_name) values("bb","Barbados");
insert into Country(country_code,country_name) values("bd","Bangladesh");
insert into Country(country_code,country_name) values("be","Belgium");
insert into Country(country_code,country_name) values("bf","Burkina Faso");
insert into Country(country_code,country_name) values("bg","Bulgaria");
insert into Country(country_code,country_name) values("bh","Bahrain");
insert into Country(country_code,country_name) values("bi","Burundi");
insert into Country(country_code,country_name) values("bj","Benin");
insert into Country(country_code,country_name) values("bm","Bermuda");
insert into Country(country_code,country_name) values("bn","Brunei Darussalam");
insert into Country(country_code,country_name) values("bo","Bolivia");
insert into Country(country_code,country_name) values("br","Brazil");
insert into Country(country_code,country_name) values("bs","Bahamas");
insert into Country(country_code,country_name) values("bt","Bhutan");
insert into Country(country_code,country_name) values("bv","Bouvet Island");
insert into Country(country_code,country_name) values("bw","Botswana");
insert into Country(country_code,country_name) values("by","Belarus");
insert into Country(country_code,country_name) values("bz","Belize");
insert into Country(country_code,country_name) values("ca","Canada");
insert into Country(country_code,country_name) values("cc","Cocos (Keeling) Islands");
insert into Country(country_code,country_name) values("cd","Congo, The Democratic Republic of the");
insert into Country(country_code,country_name) values("cf","Central African Republic");
insert into Country(country_code,country_name) values("cg","Congo");
insert into Country(country_code,country_name) values("ch","Switzerland");
insert into Country(country_code,country_name) values("ci","Cote d'Ivoire");
insert into Country(country_code,country_name) values("ck","Cook Islands");
insert into Country(country_code,country_name) values("cl","Chile");
insert into Country(country_code,country_name) values("cm","Cameroon");
insert into Country(country_code,country_name) values("cn","China");
insert into Country(country_code,country_name) values("co","Colombia");
insert into Country(country_code,country_name) values("cr","Costa Rica");
insert into Country(country_code,country_name) values("cu","Cuba");
insert into Country(country_code,country_name) values("cv","Cape Verde");
insert into Country(country_code,country_name) values("cx","Christmas Island");
insert into Country(country_code,country_name) values("cy","Cyprus");
insert into Country(country_code,country_name) values("cz","Czech Republic");
insert into Country(country_code,country_name) values("de","Germany");
insert into Country(country_code,country_name) values("dj","Djibouti");
insert into Country(country_code,country_name) values("dk","Denmark");
insert into Country(country_code,country_name) values("dm","Dominica");
insert into Country(country_code,country_name) values("do","Dominican Republic");
insert into Country(country_code,country_name) values("dz","Algeria");
insert into Country(country_code,country_name) values("ec","Ecuador");
insert into Country(country_code,country_name) values("ee","Estonia");
insert into Country(country_code,country_name) values("eg","Egypt");
insert into Country(country_code,country_name) values("eh","Western Sahara");
insert into Country(country_code,country_name) values("er","Eritrea");
insert into Country(country_code,country_name) values("es","Spain");
insert into Country(country_code,country_name) values("et","Ethiopia");
insert into Country(country_code,country_name) values("fi","Finland");
insert into Country(country_code,country_name) values("fj","Fiji");
insert into Country(country_code,country_name) values("fk","Falkland Islands (Malvinas)");
insert into Country(country_code,country_name) values("fm","Micronesia, Federated States of");
insert into Country(country_code,country_name) values("fo","Faroe Islands");
insert into Country(country_code,country_name) values("fr","France");
insert into Country(country_code,country_name) values("ga","Gabon");
insert into Country(country_code,country_name) values("gb","United Kingdom");
insert into Country(country_code,country_name) values("gd","Grenada");
insert into Country(country_code,country_name) values("ge","Georgia");
insert into Country(country_code,country_name) values("gf","French Guiana");
insert into Country(country_code,country_name) values("gg","Guernsey");
insert into Country(country_code,country_name) values("gh","Ghana");
insert into Country(country_code,country_name) values("gi","Gibraltar");
insert into Country(country_code,country_name) values("gl","Greenland");
insert into Country(country_code,country_name) values("gm","Gambia");
insert into Country(country_code,country_name) values("gn","Guinea");
insert into Country(country_code,country_name) values("gp","Guadeloupe");
insert into Country(country_code,country_name) values("gq","Equatorial Guinea");
insert into Country(country_code,country_name) values("gr","Greece");
insert into Country(country_code,country_name) values("gs","South Georgia and the South Sandwich Islands");
insert into Country(country_code,country_name) values("gt","Guatemala");
insert into Country(country_code,country_name) values("gu","Guam");
insert into Country(country_code,country_name) values("gw","Guinea-Bissau");
insert into Country(country_code,country_name) values("gy","Guyana");
insert into Country(country_code,country_name) values("hk","Hong Kong");
insert into Country(country_code,country_name) values("hm","Heard Island and McDonald Islands");
insert into Country(country_code,country_name) values("hn","Honduras");
insert into Country(country_code,country_name) values("hr","Croatia");
insert into Country(country_code,country_name) values("ht","Haiti");
insert into Country(country_code,country_name) values("hu","Hungary");
insert into Country(country_code,country_name) values("id","Indonesia");
insert into Country(country_code,country_name) values("ie","Ireland");
insert into Country(country_code,country_name) values("il","Israel");
insert into Country(country_code,country_name) values("im","Isle of Man");
insert into Country(country_code,country_name) values("in","India");
insert into Country(country_code,country_name) values("io","British Indian Ocean Territory");
insert into Country(country_code,country_name) values("iq","Iraq");
insert into Country(country_code,country_name) values("ir","Iran, Islamic Republic of");
insert into Country(country_code,country_name) values("is","Iceland");
insert into Country(country_code,country_name) values("it","Italy");
insert into Country(country_code,country_name) values("je","Jersey");
insert into Country(country_code,country_name) values("jm","Jamaica");
insert into Country(country_code,country_name) values("jo","Jordan");
insert into Country(country_code,country_name) values("jp","Japan");
insert into Country(country_code,country_name) values("ke","Kenya");
insert into Country(country_code,country_name) values("kg","Kyrgyzstan");
insert into Country(country_code,country_name) values("kh","Cambodia");
insert into Country(country_code,country_name) values("ki","Kiribati");
insert into Country(country_code,country_name) values("km","Comoros");
insert into Country(country_code,country_name) values("kn","Saint Kitts and Nevis");
insert into Country(country_code,country_name) values("kp","Korea, Democratic People's Republic of");
insert into Country(country_code,country_name) values("kr","Korea, Republic of");
insert into Country(country_code,country_name) values("kw","Kuwait");
insert into Country(country_code,country_name) values("ky","Cayman Islands");
insert into Country(country_code,country_name) values("kz","Kazakhstan");
insert into Country(country_code,country_name) values("la","Lao People's Democratic Republic");
insert into Country(country_code,country_name) values("lb","Lebanon");
insert into Country(country_code,country_name) values("lc","Saint Lucia");
insert into Country(country_code,country_name) values("li","Liechtenstein");
insert into Country(country_code,country_name) values("lk","Sri Lanka");
insert into Country(country_code,country_name) values("lr","Liberia");
insert into Country(country_code,country_name) values("ls","Lesotho");
insert into Country(country_code,country_name) values("lt","Lithuania");
insert into Country(country_code,country_name) values("lu","Luxembourg");
insert into Country(country_code,country_name) values("lv","Latvia");
insert into Country(country_code,country_name) values("ly","Libyan Arab Jamahiriya");
insert into Country(country_code,country_name) values("ma","Morocco");
insert into Country(country_code,country_name) values("mc","Monaco");
insert into Country(country_code,country_name) values("md","Moldova, Republic of");
insert into Country(country_code,country_name) values("me","Montenegro");
insert into Country(country_code,country_name) values("mg","Madagascar");
insert into Country(country_code,country_name) values("mh","Marshall Islands");
insert into Country(country_code,country_name) values("mk","Macedonia");
insert into Country(country_code,country_name) values("ml","Mali");
insert into Country(country_code,country_name) values("mm","Myanmar");
insert into Country(country_code,country_name) values("mn","Mongolia");
insert into Country(country_code,country_name) values("mo","Macao");
insert into Country(country_code,country_name) values("mp","Northern Mariana Islands");
insert into Country(country_code,country_name) values("mq","Martinique");
insert into Country(country_code,country_name) values("mr","Mauritania");
insert into Country(country_code,country_name) values("ms","Montserrat");
insert into Country(country_code,country_name) values("mt","Malta");
insert into Country(country_code,country_name) values("mu","Mauritius");
insert into Country(country_code,country_name) values("mv","Maldives");
insert into Country(country_code,country_name) values("mw","Malawi");
insert into Country(country_code,country_name) values("mx","Mexico");
insert into Country(country_code,country_name) values("my","Malaysia");
insert into Country(country_code,country_name) values("mz","Mozambique");
insert into Country(country_code,country_name) values("na","Namibia");
insert into Country(country_code,country_name) values("nc","New Caledonia");
insert into Country(country_code,country_name) values("ne","Niger");
insert into Country(country_code,country_name) values("nf","Norfolk Island");
insert into Country(country_code,country_name) values("ng","Nigeria");
insert into Country(country_code,country_name) values("ni","Nicaragua");
insert into Country(country_code,country_name) values("nl","Netherlands");
insert into Country(country_code,country_name) values("no","Norway");
insert into Country(country_code,country_name) values("np","Nepal");
insert into Country(country_code,country_name) values("nr","Nauru");
insert into Country(country_code,country_name) values("nu","Niue");
insert into Country(country_code,country_name) values("nz","New Zealand");
insert into Country(country_code,country_name) values("om","Oman");
insert into Country(country_code,country_name) values("pa","Panama");
insert into Country(country_code,country_name) values("pe","Peru");
insert into Country(country_code,country_name) values("pf","French Polynesia");
insert into Country(country_code,country_name) values("pg","Papua New Guinea");
insert into Country(country_code,country_name) values("ph","Philippines");
insert into Country(country_code,country_name) values("pk","Pakistan");
insert into Country(country_code,country_name) values("pl","Poland");
insert into Country(country_code,country_name) values("pm","Saint Pierre and Miquelon");
insert into Country(country_code,country_name) values("pn","Pitcairn");
insert into Country(country_code,country_name) values("pr","Puerto Rico");
insert into Country(country_code,country_name) values("ps","Palestinian Territory");
insert into Country(country_code,country_name) values("pt","Portugal");
insert into Country(country_code,country_name) values("pw","Palau");
insert into Country(country_code,country_name) values("py","Paraguay");
insert into Country(country_code,country_name) values("qa","Qatar");
insert into Country(country_code,country_name) values("re","Reunion");
insert into Country(country_code,country_name) values("ro","Romania");
insert into Country(country_code,country_name) values("rs","Serbia");
insert into Country(country_code,country_name) values("ru","Russian Federation");
insert into Country(country_code,country_name) values("rw","Rwanda");
insert into Country(country_code,country_name) values("sa","Saudi Arabia");
insert into Country(country_code,country_name) values("sb","Solomon Islands");
insert into Country(country_code,country_name) values("sc","Seychelles");
insert into Country(country_code,country_name) values("sd","Sudan");
insert into Country(country_code,country_name) values("se","Sweden");
insert into Country(country_code,country_name) values("sg","Singapore");
insert into Country(country_code,country_name) values("sh","Saint Helena");
insert into Country(country_code,country_name) values("si","Slovenia");
insert into Country(country_code,country_name) values("sj","Svalbard and Jan Mayen");
insert into Country(country_code,country_name) values("sk","Slovakia");
insert into Country(country_code,country_name) values("sl","Sierra Leone");
insert into Country(country_code,country_name) values("sm","San Marino");
insert into Country(country_code,country_name) values("sn","Senegal");
insert into Country(country_code,country_name) values("so","Somalia");
insert into Country(country_code,country_name) values("sr","Suriname");
insert into Country(country_code,country_name) values("st","Sao Tome and Principe");
insert into Country(country_code,country_name) values("sv","El Salvador");
insert into Country(country_code,country_name) values("sy","Syrian Arab Republic");
insert into Country(country_code,country_name) values("sz","Swaziland");
insert into Country(country_code,country_name) values("tc","Turks and Caicos Islands");
insert into Country(country_code,country_name) values("td","Chad");
insert into Country(country_code,country_name) values("tf","French Southern Territories");
insert into Country(country_code,country_name) values("tg","Togo");
insert into Country(country_code,country_name) values("th","Thailand");
insert into Country(country_code,country_name) values("tj","Tajikistan");
insert into Country(country_code,country_name) values("tk","Tokelau");
insert into Country(country_code,country_name) values("tl","Timor-Leste");
insert into Country(country_code,country_name) values("tm","Turkmenistan");
insert into Country(country_code,country_name) values("tn","Tunisia");
insert into Country(country_code,country_name) values("to","Tonga");
insert into Country(country_code,country_name) values("tr","Turkey");
insert into Country(country_code,country_name) values("tt","Trinidad and Tobago");
insert into Country(country_code,country_name) values("tv","Tuvalu");
insert into Country(country_code,country_name) values("tw","Taiwan");
insert into Country(country_code,country_name) values("tz","Tanzania, United Republic of");
insert into Country(country_code,country_name) values("ua","Ukraine");
insert into Country(country_code,country_name) values("ug","Uganda");
insert into Country(country_code,country_name) values("um","United States Minor Outlying Islands");
insert into Country(country_code,country_name) values("us","United States");
insert into Country(country_code,country_name) values("uy","Uruguay");
insert into Country(country_code,country_name) values("uz","Uzbekistan");
insert into Country(country_code,country_name) values("va","Holy See (Vatican City State)");
insert into Country(country_code,country_name) values("vc","Saint Vincent and the Grenadines");
insert into Country(country_code,country_name) values("ve","Venezuela");
insert into Country(country_code,country_name) values("vg","Virgin Islands, British");
insert into Country(country_code,country_name) values("vi","Virgin Islands, U.S.");
insert into Country(country_code,country_name) values("vn","Vietnam");
insert into Country(country_code,country_name) values("vu","Vanuatu");
insert into Country(country_code,country_name) values("wf","Wallis and Futuna");
insert into Country(country_code,country_name) values("ws","Samoa");
insert into Country(country_code,country_name) values("ye","Yemen");
insert into Country(country_code,country_name) values("yt","Mayotte");
insert into Country(country_code,country_name) values("za","South Africa");
insert into Country(country_code,country_name) values("zm","Zambia");
insert into Country(country_code,country_name) values("zw","Zimbabwe");
Сделал такой запрос вывело такую ошибку:

Код: Выделить всё
Ошибка
SQL запрос:
#
#  Table structure for Countries table
#
CREATE TABLE Country(
      country_code             char(2) not null,
      country_name             varchar(60) not null,
      primary key(country_code)
)type=innodb DEFAULT CHARACTER SET utf8   COLLATE utf8_general_ci;
Ответ MySQL:

#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 'type=innodb DEFAULT CHARACTER SET utf8    COLLATE utf8_general_ci' at line 8
Как исправить?
ден
Гость

Сообщение #15 VEG » 28.07.2013, 13:08

ден, эти запросы, очевидно, не имеют отношения к phpBBex. Вам следует обратиться к справочнику по SQL, чтобы разобраться в синтаксисе SQL и выявить свою ошибку.
VEG M
Администратор
Аватара
Откуда: Finland
Репутация: 1653
С нами: 11 лет 11 месяцев

Сообщение #16 HD321kbps » 28.07.2013, 13:54

может мод стоит с отображение флагов стран)
HD321kbps M
Аватара
Откуда: Армянск
Репутация: 376
С нами: 11 лет


Вернуться в Поддержка 1.x



cron