Jump to content

Recommended Posts

Добрый день! Помогите исправить ошибку.

 

Установил модуль, но требуется сделать запрос в базу банных

 

 

ALTER TABLE oc_option ADD show_description_like INT(1) NOT NULL
ALTER TABLE oc_option_description ADD description TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
ALTER TABLE oc_option_value ADD show_description_like INT(1) NOT NULL
ALTER TABLE oc_option_value_description ADD description TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL

 

Вхожу в phpMyAdmin - Выбираю базу данных в которую надо сделать запрос - Вхожу в 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 'ALTER TABLE oc_option_description ADD description TEXT CHARACTER SET utf8 COLLAT' at line 2
 
Что делаю неправильно?

 

Share this post


Link to post
Share on other sites

Префикс базы данных точно "oc_"  ?

Share this post


Link to post
Share on other sites

Разработчик пишет вариации

 

ALTER TABLE oc_option ADD show_description_like INT(1) NOT NULL
ALTER TABLE oc_option_description ADD description TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
ALTER TABLE oc_option_value ADD show_description_like INT(1) NOT NULL
ALTER TABLE oc_option_value_description ADD description TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL

 

или

 

ALTER TABLE option ADD show_description_like INT(1) NOT NULL
ALTER TABLE option_description ADD description TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
ALTER TABLE option_value ADD show_description_like INT(1) NOT NULL
ALTER TABLE option_value_description ADD description TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL

 

при запросе этой вариации вылетает такая ошибка

 

 

#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 'option ADD show_description_like INT(1) NOT NULL ALTER TABLE option_description' at line 1
 
Set Product Options Description in Tooltip for 1.5.x.x (vQmod)
http:// www.opencart.com/index.php?route=extension/extension/info&extension_id=13981
 
Ставлю на OCstore 1.5.4.1.2
phpMyAdmin 3.5.8.1

Share this post


Link to post
Share on other sites

Перед каждым 'ALTER TABLE' (кроме первого) добавьте ';'

Share this post


Link to post
Share on other sites

Добавил запятые перед  ALTER TABLE кроме первого, но ситуация не изменилась

 

Если недостаточно информации спрашивайте отвечу.

Share this post


Link to post
Share on other sites

Ну выполните тогда не все запросы сразу, а построчно

 

Но странно что так не работает

ALTER TABLE oc_option ADD show_description_like INT(1) NOT NULL;
ALTER TABLE oc_option_description ADD description TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
ALTER TABLE oc_option_value ADD show_description_like INT(1) NOT NULL;
ALTER TABLE oc_option_value_description ADD description TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;

Share this post


Link to post
Share on other sites

По отдельности прошли кроме строки

ALTER TABLE option ADD show_description_like INT(1) NOT NULL

#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 'option ADD show_description_like INT(1) NOT NULL' at line 1

ПРОШЛО ВСЁ. Почему то при копировании в конец строки добавлялся знак '

Выше можно увидеть в ошибке есть этот знак в конце строки.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.