Ошибка 1064 ошибка службы при обработке команды как исправить

Learn how to fix "the MySQL 1064 error" message once and for all. This is a syntax error, which means MySQL isn't able to understand your command.

If you’ve been using WordPress for a while, you may have decided to get into more advanced database management. This often involves using the MySQL command line, which can, in turn, lead to confusing problems such as MySQL 1064 errors.

Fortunately, while resolving this error can be confusing at first due to its many potential causes, its solutions tend to be relatively simple. Once you determine the reason behind the database error you’re seeing, you should be able to fix it fairly quickly.

In this post, we’ll cover the various possible causes of the MySQL 1064 error. Then we’ll share solutions for each common situation, to help you get your database and your site back up and running.

Let’s get started!

Why the MySQL 1064 Error Occurs

The MySQL 1064 error is a syntax error. This means the reason there’s a problem is because MySQL doesn’t understand what you’re asking it to do. However, there are many different situations that can lead to this type of miscommunication between you and your database.

The simplest cause is that you’ve made a mistake while typing in a command and MySQL can’t understand your request. Alternatively, you may be attempting to use outdated or even obsolete commands that can’t be read.

In other cases, you may have attempted to include a ‘reserved word’ in one of your commands. Reserved words are terms that can only be used in specific contexts in MySQL. If you attempt to use them in other ways, you’ll be faced with an error.

It’s also possible that there is some data missing from your database. When you make a request via MySQL which references data that isn’t where it’s supposed to be, you’ll also see the 1064 error. Finally, transferring your WordPress database to another server can also lead to the same issue.

As you can see, there are many potential causes for this problem, which can make it tricky to resolve. Unless you’re in the process of moving your database or taking some other action that points to a specific cause, you’ll likely need to try a few different solutions before you land on the right one. Fortunately, none of them are too difficult to execute, as we’ll see next.

Oh no, you’re getting the MySQL 1064 Error…😭 Don’t despair! Here are 5 proven solutions to get it fixed immediately 🙏Click to Tweet

How to Fix the MySQL 1064 Error (5 Methods)

If you already have an idea of what’s causing your MySQL 1064 error, you can simply skip down to the resolution for your specific situation. However, if you’re not sure why the error has occurred, the simplest strategy is to try the easiest solution first.

In that case, we’d suggest testing out the five most likely fixes in the following order.

1. Correct Mistyped Commands

The good thing about MySQL typos is that they’re the simplest explanation for syntax issues such as the 1064 error. Unfortunately, they can also be the most tedious to correct. Generally speaking, your best option is to manually proofread your code and look for any mistakes you may have made.

We suggest using the MySQL Manual as a reference while you do so, double-checking anything you’re not sure about. As you might imagine, this can get pretty time-consuming, especially if you’ve been working in the MySQL command line for a while or if you’re new to this task.

An alternative to manually checking your work is to employ a tool such as EverSQL:

MySQL 1064 Error: EverSQL syntax checker

EverSQL syntax checker

With this solution, you can simply input your MySQL to check for errors automatically. However, keep in mind that these platforms aren’t always perfect and you may still want to validate the results yourself.

2. Replace Obsolete Commands

As platforms grow and change, some commands that were useful in the past are replaced by more efficient ones. MySQL is no exception. If you’re working on your database following a recent update or have referenced an outdated source during your work, it’s possible that one or more of your commands are no longer valid.

You can check to see whether this is the case using the MySQL Reference Manual. You’ll find mentions of commands that have been made obsolete by each MySQL version in the relevant sections:

MySQL 1064 Error: Manually removing obsolete commands

Manually removing obsolete commands

Once you’ve determined which command is likely causing the problem, you can simply use the ‘find and replace’ function to remove the obsolete command and add in the new version. For example, if you were using storage_engine and find that it no longer works, you could simply replace all instances with the new default_storage_engine command.

3. Designate Reserved Words

In MySQL, using a reserved word out of context will result in a syntax error, as it will be interpreted as incorrect. However, you can still use reserved words however you please by containing them within backticks, like this: `select`

Each version of MySQL has its own reserved words, which you can read up on in the MySQL Reference Manual. A quick find and replace should enable you to resolve this issue if you think it may be causing your 1064 error.

4. Add Missing Data

If your latest MySQL query attempts to reference information in a database and can’t find it, you’re obviously going to run into problems. In the event that none of the preceding solutions resolves your MySQL 1064 error, it may be time to go looking for missing data.

Unfortunately, this is another solution that can be quite tedious and has to be done by hand. The best thing you can do in this situation is to work backward, starting with your most recent query. Check each database it references, and make sure all the correct information is present. Then move on to the next most recent query, until you come to the one that’s missing some data.

5. Use Compatibility Mode to Transfer WordPress Databases

This final 1064 error solution isn’t as straightforward as the others on our list. However, if you’re migrating your WordPress site to a new host or otherwise moving it to a different server, you’ll need to take extra steps to avoid causing problems with your database.

The simplest solution is to use a migration plugin that includes a compatibility mode, such as WP Migrate DB:

WP Migrate DB WordPress plugin

WP Migrate DB WordPress plugin

This will enable an auto-detection feature that will make sure your latest site backup and database are compatible with multiple versions of MySQL. You can access the compatibility mode setting by navigating to Tools > Migrate DB > Advanced Options:

WP Migrate DB settings

WP Migrate DB settings

Check the box next to Compatible with older versions of MySQL before starting your site migration. This way, you should be able to avoid any issues during the process.

Summary

Database errors can throw a wrench in your plans, and may even compromise your website’s stability. Knowing how to resolve issues such as the MySQL 1064 error can help you react quickly, and minimize downtime on your site.

There are five methods you can try to fix the MySQL 1064 error when you encounter it, depending on its most likely cause:

  1. Correct mistyped commands.
  2. Replace obsolete commands.
  3. Designate reserved words.
  4. Add missing data.
  5. Transfer WordPress databases in compatibility mode.

Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

If you’ve been using WordPress for a while, you may have decided to get into more advanced database management. This often involves using the MySQL command line, which can, in turn, lead to confusing problems such as MySQL 1064 errors.

Fortunately, while resolving this error can be confusing at first due to its many potential causes, its solutions tend to be relatively simple. Once you determine the reason behind the database error you’re seeing, you should be able to fix it fairly quickly.

In this post, we’ll cover the various possible causes of the MySQL 1064 error. Then we’ll share solutions for each common situation, to help you get your database and your site back up and running.

Let’s get started!

Why the MySQL 1064 Error Occurs

The MySQL 1064 error is a syntax error. This means the reason there’s a problem is because MySQL doesn’t understand what you’re asking it to do. However, there are many different situations that can lead to this type of miscommunication between you and your database.

The simplest cause is that you’ve made a mistake while typing in a command and MySQL can’t understand your request. Alternatively, you may be attempting to use outdated or even obsolete commands that can’t be read.

In other cases, you may have attempted to include a ‘reserved word’ in one of your commands. Reserved words are terms that can only be used in specific contexts in MySQL. If you attempt to use them in other ways, you’ll be faced with an error.

It’s also possible that there is some data missing from your database. When you make a request via MySQL which references data that isn’t where it’s supposed to be, you’ll also see the 1064 error. Finally, transferring your WordPress database to another server can also lead to the same issue.

As you can see, there are many potential causes for this problem, which can make it tricky to resolve. Unless you’re in the process of moving your database or taking some other action that points to a specific cause, you’ll likely need to try a few different solutions before you land on the right one. Fortunately, none of them are too difficult to execute, as we’ll see next.

Oh no, you’re getting the MySQL 1064 Error…😭 Don’t despair! Here are 5 proven solutions to get it fixed immediately 🙏Click to Tweet

How to Fix the MySQL 1064 Error (5 Methods)

If you already have an idea of what’s causing your MySQL 1064 error, you can simply skip down to the resolution for your specific situation. However, if you’re not sure why the error has occurred, the simplest strategy is to try the easiest solution first.

In that case, we’d suggest testing out the five most likely fixes in the following order.

1. Correct Mistyped Commands

The good thing about MySQL typos is that they’re the simplest explanation for syntax issues such as the 1064 error. Unfortunately, they can also be the most tedious to correct. Generally speaking, your best option is to manually proofread your code and look for any mistakes you may have made.

We suggest using the MySQL Manual as a reference while you do so, double-checking anything you’re not sure about. As you might imagine, this can get pretty time-consuming, especially if you’ve been working in the MySQL command line for a while or if you’re new to this task.

An alternative to manually checking your work is to employ a tool such as EverSQL:

MySQL 1064 Error: EverSQL syntax checker

EverSQL syntax checker

With this solution, you can simply input your MySQL to check for errors automatically. However, keep in mind that these platforms aren’t always perfect and you may still want to validate the results yourself.

2. Replace Obsolete Commands

As platforms grow and change, some commands that were useful in the past are replaced by more efficient ones. MySQL is no exception. If you’re working on your database following a recent update or have referenced an outdated source during your work, it’s possible that one or more of your commands are no longer valid.

You can check to see whether this is the case using the MySQL Reference Manual. You’ll find mentions of commands that have been made obsolete by each MySQL version in the relevant sections:

MySQL 1064 Error: Manually removing obsolete commands

Manually removing obsolete commands

Once you’ve determined which command is likely causing the problem, you can simply use the ‘find and replace’ function to remove the obsolete command and add in the new version. For example, if you were using storage_engine and find that it no longer works, you could simply replace all instances with the new default_storage_engine command.

3. Designate Reserved Words

In MySQL, using a reserved word out of context will result in a syntax error, as it will be interpreted as incorrect. However, you can still use reserved words however you please by containing them within backticks, like this: `select`

Each version of MySQL has its own reserved words, which you can read up on in the MySQL Reference Manual. A quick find and replace should enable you to resolve this issue if you think it may be causing your 1064 error.

4. Add Missing Data

If your latest MySQL query attempts to reference information in a database and can’t find it, you’re obviously going to run into problems. In the event that none of the preceding solutions resolves your MySQL 1064 error, it may be time to go looking for missing data.

Unfortunately, this is another solution that can be quite tedious and has to be done by hand. The best thing you can do in this situation is to work backward, starting with your most recent query. Check each database it references, and make sure all the correct information is present. Then move on to the next most recent query, until you come to the one that’s missing some data.

5. Use Compatibility Mode to Transfer WordPress Databases

This final 1064 error solution isn’t as straightforward as the others on our list. However, if you’re migrating your WordPress site to a new host or otherwise moving it to a different server, you’ll need to take extra steps to avoid causing problems with your database.

The simplest solution is to use a migration plugin that includes a compatibility mode, such as WP Migrate DB:

WP Migrate DB WordPress plugin

WP Migrate DB WordPress plugin

This will enable an auto-detection feature that will make sure your latest site backup and database are compatible with multiple versions of MySQL. You can access the compatibility mode setting by navigating to Tools > Migrate DB > Advanced Options:

WP Migrate DB settings

WP Migrate DB settings

Check the box next to Compatible with older versions of MySQL before starting your site migration. This way, you should be able to avoid any issues during the process.

Summary

Database errors can throw a wrench in your plans, and may even compromise your website’s stability. Knowing how to resolve issues such as the MySQL 1064 error can help you react quickly, and minimize downtime on your site.

There are five methods you can try to fix the MySQL 1064 error when you encounter it, depending on its most likely cause:

  1. Correct mistyped commands.
  2. Replace obsolete commands.
  3. Designate reserved words.
  4. Add missing data.
  5. Transfer WordPress databases in compatibility mode.

Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

3 / 3 / 1

Регистрация: 19.05.2019

Сообщений: 159

1

04.04.2021, 14:31. Показов 8424. Ответов 5


https://docs.microsoft.com/ru-… t-designer

выполнял код отсюда, значит код рабочий , уверен кто это делал сталкивался с этой проблемой и надеюсь решил.
Тоесть моя служба видна в списке служб , при ее запуске выскакивает такая ошибка.

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



3 / 3 / 1

Регистрация: 19.05.2019

Сообщений: 159

04.04.2021, 14:36

 [ТС]

2

Увеличиваю сообщение до 3х символов

Миниатюры

Ошибка службы при обработке команды (1064)
 



0



2715 / 2026 / 374

Регистрация: 22.07.2011

Сообщений: 7,672

04.04.2021, 14:58

3

ДЛ имончик, пример кода в методе OnStart покажите.



0



ДЛ имончик

3 / 3 / 1

Регистрация: 19.05.2019

Сообщений: 159

04.04.2021, 16:44

 [ТС]

4

C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
protected override void OnStart(string[] args)
        {
            ServiceStatus serviceStatus = new ServiceStatus();
            serviceStatus.dwCurrentState = ServiceState.SERVICE_START_PENDING;
            serviceStatus.dwWaitHint = 100000;
            SetServiceStatus(this.ServiceHandle, ref serviceStatus);
            eventLog1.WriteEntry("In OnStart.");
            Timer timer = new Timer();
            timer.Interval = 60000; // 60 seconds
            timer.Elapsed += new ElapsedEventHandler(this.OnTimer);
            timer.Start();
            serviceStatus.dwCurrentState = ServiceState.SERVICE_RUNNING;
            SetServiceStatus(this.ServiceHandle, ref serviceStatus);
        }



0



2715 / 2026 / 374

Регистрация: 22.07.2011

Сообщений: 7,672

04.04.2021, 20:42

5

ДЛ имончик, оберни все это в try catch , наверняка тут падает , потому служба и не стартует.



0



ДЛ имончик

3 / 3 / 1

Регистрация: 19.05.2019

Сообщений: 159

05.04.2021, 13:08

 [ТС]

6

не помогло, служба запускается , грузится и тогда возникает ошибка (где то на 10%), она и раньше начинала запуск
У меня есть метод

C#
1
private void eventLog1_EntryWritten(object sender, EntryWrittenEventArgs e)

он пустой , но при этом есть такие команды

C#
1
 eventLog1.WriteEntry("File not found");

мб тут проблема?

Добавлено через 16 минут
не фигня, не прав



0



I wrote a Windows Service to run on Win10, and it worked perfectly fine until I decided to change it a bit. I rewrote some logic, tested it in both Debug and Release configurations, and everything was fine. Then I uninstalled the current version of the service using installutil.exe /u %servicename.exe% and reinstalled it again using installutil.exe %servicename.exe%.
For some reason, this new version cannot start, and it crashes with Error 1064. This is the full error text:

Windows could not start %servicename% service on Local Computer. Error 1064: An exception occurred in the service when handling the control request.

The last time I installed this service, I ran into some difficulties, but quickly fixed them by changing the Log On properties. This time, it is not working. Please help with this issue.

Thanks.

Update 1

Here are my Main() and OnStart() service methods:

Main()

static void Main()
{
#if DEBUG
    var service = new SalesforceToJiraService();
    service.OnDebug();
    Thread.Sleep(Timeout.Infinite);
#else
    ServiceBase[] ServicesToRun;
    ServicesToRun = new ServiceBase[]
    {
        new SalesforceToJiraService()
    };
     ServiceBase.Run(ServicesToRun);
#endif
}

OnStart()

protected override void OnStart(string[] args)
{
    this.ConfigureServices();

    this.timer.Start();
    this.logger.Information("SalesforceToJira service started.");
}

Update 2

More code:

ConfigureServices()

protected void ConfigureServices()
{
    this.configuration = ConfigurationHelper.LoadConfiguration(ConfigurationPath);
    this.logger = ConfigurationHelper.ConfigureLogger(this.configuration.Logs.LogsPath);

    this.timer = ConfigurationHelper.ConfigureTimer(this.configuration.ProcessInterval.TotalMilliseconds,
        (sender, eventArgs) => this.ProcessCasesAsync(sender, eventArgs).GetAwaiter().GetResult());

    this.salesforceClient = new SalesforceCliClient(this.configuration.Salesforce.CliPath);

    this.jiraClient = Jira.CreateRestClient(
        this.configuration.Jira.Url,
        this.configuration.Jira.Username,
        this.configuration.Jira.Password);
}

I’m using Newtonsoft.JSON for deserializing a JSON configuration file, Serilog for logging, System.Timers.Timer for periodic events, AtlassianSDK for the Jira API and some wrappers over Salesforce CLI for Salesforce.

4

Пользователь создал 2 заказа подряд, с разницей в несколько секунд, во втором заказе отображается только доставка, товаров нет. Такое было и раньше, удаляли просто заказ и всё. А теперь мы даже в него зайти не можем, выскакивает такая ошибка.

В db.log вот что:

2020-03-22 21:23:45 109.252.36.200
Query Error 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 ')
                GROUP BY pc.id
                ORDER BY pc.name' at line 5
Query: SELECT pc.*, GROUP_CONCAT(tc.type_id SEPARATOR ',') AS type_ids
                FROM shop_product_code AS pc
                    JOIN shop_type_codes AS tc
                        ON tc.code_id=pc.id
                        AND tc.type_id IN (0, )
                GROUP BY pc.id
                ORDER BY pc.name
## wa-system/database/waModel.class.php(266)
#0 wa-system/database/waModel.class.php(366): waModel->run('SELECT pc.*, GR...')
#1 wa-system/database/waDbStatement.class.php(229): waModel->query('SELECT pc.*, GR...')
#2 wa-system/database/waModel.class.php(346): waDbStatement->query(Array)
#3 wa-apps/shop/lib/model/shopProductCode.model.php(40): waModel->query('SELECT pc.*, GR...', Array)
#4 wa-apps/shop/lib/model/shopOrderItemCodes.model.php(33): shopProductCodeModel->getByType(Array)
#5 wa-apps/shop/lib/classes/shopOrder.class.php(772): shopOrderItemCodesModel->extendOrderItems(Array)
#6 wa-apps/shop/lib/classes/shopOrder.class.php(462): shopOrder->getItemsProductCodes()
#7 wa-apps/shop/lib/classes/shopOrder.class.php(606): shopOrder->__get('items_product_c...')
#8 wa-apps/shop/lib/workflow/shopWorkflowEditcodeAction.class.php(22): shopOrder->offsetGet('items_product_c...')
#9 wa-apps/shop/lib/workflow/shopWorkflowState.class.php(93): shopWorkflowEditcodeAction->isAvailable(Object(shopOrder))
#10 wa-apps/shop/lib/classes/shopOrder.class.php(856): shopWorkflowState->getActions(Object(shopOrder))
#11 wa-apps/shop/lib/classes/shopOrder.class.php(460): shopOrder->readActions()
#12 wa-apps/shop/lib/classes/shopOrder.class.php(907): shopOrder->__get('actions')
#13 wa-apps/shop/lib/classes/shopOrder.class.php(460): shopOrder->readWorkflowActionElements()
#14 wa-apps/shop/lib/actions/order/shopOrder.action.php(36): shopOrder->__get('workflow_action...')
#15 wa-system/controller/waViewAction.class.php(161): shopOrderAction->execute()
#16 wa-system/controller/waViewController.class.php(86): waViewAction->display()
#17 wa-system/controller/waDefaultViewController.class.php(48): waViewController->executeAction(Object(shopOrderAction))
#18 wa-system/controller/waController.class.php(21): waDefaultViewController->execute()
#19 wa-system/controller/waViewController.class.php(46): waController->run(NULL)
#20 wa-system/controller/waFrontController.class.php(263): waViewController->run(NULL)
#21 wa-system/controller/waFrontController.class.php(190): waFrontController->runController(Object(waDefaultViewController), NULL)
#22 wa-system/controller/waFrontController.class.php(84): waFrontController->execute(NULL, 'order', NULL)
#23 wa-system/waSystem.class.php(741): waFrontController->dispatch()
#24 wa-system/waSystem.class.php(613): waSystem->dispatchBackend('webasyst/shop/')
#25 index.php(7): waSystem->dispatch()
#26 {main}

Что это и почему это?


21 комментарий

  • популярные
  • новые


  • +2

    Видимо было установлено последнее обновление Shop-script?

    Ошибка указывает на неправильный запрос в базу данных. Связан он с таблицей 

    shop_type_codes 

    Точнее в этом месте запроса

    AND tc.type_id IN (0, )

    где после запятой отсутствует идентификатор.

    Предполагаю, что данная ошибка связана с новым функционалом Товарных кодов, добавленным в последнем обновлении Shop-script. 

    Если заказ без товаров, то в нём нет и товарных кодов. Поэтому, скорее всего, и возникает ошибка. Разработчики, очевидно, предполагают, что не может быть заказа без товаров, что, в принципе, логично.

    В Вашем случае нужно переделать функционал корзины, чтобы не допускать создание «пустых» заказов. Предполагаю, что они возникают из-за многократного нажатия на кнопку подтверждения оформления заказа в корзине, когда клиент не дожидается ответа сервера. Если так, то решением будет являться блокировка кнопки создания заказа после нажатия.



    • +1

      Да, именно после обновления такая фигня появилась. 

      А как сделать блокировку кнопки?

      И как удалить этот висящий сейчас полузаказ?



      • +2

        А как сделать блокировку кнопки?

        Это зависит от шаблона корзины Вашего сайта. Скорее всего, Вы используете не стандартную корзину, а какой-то плагин или отдельный шаблон корзины.Вероятно, потребуется найти js код, отвечающий за нажатие кнопки «Оформить заказ» и доработать его.

        И как удалить этот висящий сейчас полузаказ?

        Проще всего через базу данных найти заказ по идентификатору в таблице shop_order. Далее в поле state_id поменять значение на deleted. 

        Ещё можете попробовать такой вариант. Откройте заказ по прямой ссылке на редактирование

        https://domain/webasyst/shop/?action=orders#/orders/edit/order_id/
        domain - url сайта
        order_id - id заказа

        Если откроется, то добавьте хотя бы один товар и сохраните. Далее уже удалите стандартно…



        • +1

          Спасибо! По ссылке для редактирования удалось добавить товар и после этого удалить заказ.

          Да, мы используем плагин «Заказ на одной странице».



          • +1

            будем надеться, что починят, раз статус «принято» появился.

            А вообще, у нас много косяков повылезало после последнего обновления.



          • +2

            Попробуйте в качестве быстрого исправления в файле wa-apps/shop/lib/model/shopProductCode.model.php перед строкой

            $sql = "SELECT pc.*, GROUP_CONCAT(tc.type_id SEPARATOR ',') AS type_ids

            добавить

            if (!$type_id) {
                $type_id = 0;
            }



            • +1

              Мы выпустили обновление Shop-Script с исправлением этой ошибки. Обновление можно установить в «Инсталлере».

              Проверьте, пожалуйста. Сообщите, если проблема сохранилась.



              • +1

                А можно сделать на уровне движка, а не шаблона, чтобы пользователь «тыркающий» несколько раз подряд на кнопку оформления заказа получал только один заказ, а не несколько?



                • +1

                  Почему вы задаёте этот вопрос? В вашей теме дизайна нет блокировки повторного нажатия на кнопку оформления заказа?



                  • +2

                    За год мы сменили три разных дизайна и ни в одном не было блокировки. Штатного программиста нет, поэтому было бы очень удобно, чтобы такая функция была по умолчанию в скрипте движка.



                    • 0

                      Напишите об этом разработчику темы дизайна, чтобы исправил недочёт в своём продукте.



                    • +4

                      Михаил, в многих темах дизайна, есть нормальные всплывающие окна, есть нормальный слайдер товаров (я про рекомендованные), но вы то зашиваете свое и без права редактирования. Если вы и берете все управление корзиной уже на свою сторону, тогда вносите все такие просьбы уже сами в свой код



                        • +2

                          А разве ничего? Вся корзина — встроена в движок. Речь про одностраничную само собой. Ваша идея и стремление, почему так сделано понятна, хоть и не идеальна. Вы полностью ее контролируете, дав нам, разработчикам, только подписываться на события. Если весь контроль и логика вшита в движок, то и будьте добры, продумайте все возможные проблемы, в том числе и блокировка повторного нажатия. Но нет же, вы перекладываете это на сторонних разработчиков.

                          P.S. что касательно списка рекомендуемых товаров. Вот клиент не хочет выводить список товаров, который подбирает движок. Не нравится карусель товаров, в которой он выводится. Что мне делать с этим кодом? 

                          {$wa->shop->checkout()->crossSelling([
                              "DEBUG" => true,
                              "wrapper" => "#js-cross-selling-section"
                          ])}

                          как вырубить вашу карусель, как вырубить вашу подборку и вставить к примеру кастомный список товаров — документации нет, ибо и такой возможности нет.

                          Надеюсь я ответил на ваш вопрос



                          • +1

                            В какой теме дизайна возможно двойное нажатие на кнопку подтверждения заказа при оформлении заказа в корзине?



                            • +2

                              Этот вопрос должен быть адресован автору выше


                              А по сути какая разница? Это так сложно реализовать? К примеру если на момент оформления заказа, будет 500 ошибка, клиент этого не видит, и судорожно несколько раз жмет кнопку



                            • +1

                              С пошаговым оформление понятно. А как быть с оформлением в корзине?



                              • +1

                                Что именно вы хотите узнать?



                                • +1

                                  Как именно при оформлении заказа в корзине блокируется и блокируется ли вообще двойное нажатие?

                                  Добавить комментарий

                                  Содержание

                                  1. ИТ База знаний
                                  2. Полезно
                                  3. Навигация
                                  4. Серверные решения
                                  5. Телефония
                                  6. Корпоративные сети
                                  7. SQL error 1064 – что делать?
                                  8. Бесплатный вводный урок на онлайн курс по Linux
                                  9. Использование зарезервированных слов
                                  10. Недостающая информация в таблице
                                  11. NoSQL
                                  12. Полезно?
                                  13. Почему?
                                  14. MySQL error 1064
                                  15. 1. Запрос в редакторе.
                                  16. 2. Перенос базы на другой сервер.
                                  17. 3. Некорректная работа сайта.
                                  18. Форум пользователей MySQL
                                  19. #1 22.11.2010 05:31:00
                                  20. ERROR 1064 (42000) Я Полный чайник
                                  21. #2 22.11.2010 06:42:48
                                  22. Re: ERROR 1064 (42000) Я Полный чайник
                                  23. #3 23.11.2010 01:50:30
                                  24. Re: ERROR 1064 (42000) Я Полный чайник
                                  25. #4 23.11.2010 01:59:31
                                  26. Re: ERROR 1064 (42000) Я Полный чайник
                                  27. #5 23.11.2010 15:28:00
                                  28. Re: ERROR 1064 (42000) Я Полный чайник

                                  ИТ База знаний

                                  Курс по Asterisk

                                  Полезно

                                  — Узнать IP — адрес компьютера в интернете

                                  — Онлайн генератор устойчивых паролей

                                  — Онлайн калькулятор подсетей

                                  — Калькулятор инсталляции IP — АТС Asterisk

                                  — Руководство администратора FreePBX на русском языке

                                  — Руководство администратора Cisco UCM/CME на русском языке

                                  — Руководство администратора по Linux/Unix

                                  Навигация

                                  Серверные решения

                                  Телефония

                                  FreePBX и Asterisk

                                  Настройка программных телефонов

                                  Корпоративные сети

                                  Протоколы и стандарты

                                  SQL error 1064 – что делать?

                                  Вам когда-нибудь приходилось видеть ошибку 1064 при работе с MySQL? Причем она указывает на некие синтаксические ошибки в SQL запросе, и эти ошибки могут быть совсем неочевидны – подробнее расскажем ниже.

                                  Бесплатный вводный урок на онлайн курс по Linux

                                  Мы собрали концентрат самых востребованных знаний, которые позволят начать карьеру администраторов Linux, расширить текущие знания и сделать уверенный шаг в DevOps

                                  Использование зарезервированных слов

                                  У каждой версии MySQL есть свой список зарезервированных слов – эти слова используются для особых задач или особых функций внутри движка MySQL. При попытке использовать какие-то из них, вы получите ту самую ошибку 1064. К примеру, ниже пример SQL запроса, который использует зарезервированное слово в качестве имени таблицы.

                                  Как этого избежать? Просто! Только потому что слово alter зарезервировано, это не значит, что его нельзя использовать – нужно просто по-особенному приготовить! Чтобы движок MySQL не воспринимал это слово как команду, мы будем просто использовать кавычки и оно взлетит:

                                  Недостающая информация в таблице

                                  Иногда какой-то части информации в таблице нет и это может вызвать эту ошибку, если запрос обращался к этим данным. К примеру, если в таблице был список сотрудников, и каждому был присвоен ID, было бы логично предположить, что запрос будет вызывать запись сотрудника вместе с номером ID, например:

                                  Если пресловутый $id никогда не был правильно указан, запрос будет выглядеть для MySQL сервера следующим образом:

                                  Т.к запрос по сути пустой, движок MySQL будет выдавать ту самую ошибку 1064. Исправляется это следующим образом – вам нужно каким-то образом вызвать конкретную запись и добавить недостающую информацию, причем сделать это не так просто: если пытаться вызвать запись по уникальному номеру, скорее всего вы увидите точно такую ошибку. Можно с помощью phpMyAdmin вручную выбрать необходимую строку и добавить нужную информацию.

                                  Опечатки в командах

                                  Одной из самых частых причин ошибки 1064 являются опечатки. И иногда можно десять раз посмотреть на команду и не увидеть опечатки – как пример ниже с командой UPDATE:

                                  Соответственно, проверяйте команды свежим взглядом и старайтесь не пропускать такого. Правильный вариант будет выглядеть так:

                                  Устаревшие команды

                                  Некоторые команды устарели, и в новых версиях MySQL начинают выдавать хорошо знакомую нам ошибку. К примеру, команда ‘TYPE’ была признана устаревшей в MySQL 4.1 и была полностью удалена в MySQL 5.1, где при попытке использовать ее вы можете видеть ту самую ошибку. Вместо нее необходимо использовать команду ‘ENGINE’.

                                  Ниже неверный вариант:

                                  А вот правильный, модный и современный вариант (как оно должно быть, чтобы не было ошибки):

                                  Заключение

                                  Как можно видеть, для одной несчастной ошибки, указывающей на синтаксис, может быть целый ряд разных причин. Так что когда вы видите подобную ошибку – вспомните эту статью и проверьте все возможные варианты ?

                                  NoSQL

                                  Научись создавать архитектуру хранения данных, управлять ею и автоматизировать рутинные процессы

                                  Полезно?

                                  Почему?

                                  😪 Мы тщательно прорабатываем каждый фидбек и отвечаем по итогам анализа. Напишите, пожалуйста, как мы сможем улучшить эту статью.

                                  😍 Полезные IT – статьи от экспертов раз в неделю у вас в почте. Укажите свою дату рождения и мы не забудем поздравить вас.

                                  Источник

                                  MySQL error 1064

                                  Автор: Василий Лукьянчиков , vl (at) sqlinfo (dot) ru

                                  Статья ориентирована на новичков. В ней объясняется, что означает ошибка сервера MySQL №1064, рассматриваются типичные ситуации и причины возникновения этой ошибки, а также даются рекомендации по исправлению.

                                  Рассмотрим простейший пример.

                                  Сервер MySQL сообщает, что в первой строке нашего SQL запроса имеется синтаксическая ошибка, и в одинарных кавычках цитирует часть запроса с того места где начинается ошибка. Это очень полезное свойство, так как позволяет сразу определить место, которое сервер счел ошибочным. В данном случае это ‘-10,10’, ошибка возникает из-за того, что параметр LIMIT не может быть отрицательным числом.

                                  Однако, бывает и так, что цитируемый кусок запроса не содержит синтаксической ошибки. Это означает, что данная часть запроса находится не на своем месте из-за чего весь запрос становится синтаксически неверным. Например, отсутствует разделитель между двумя запросами, пропущен кусок запроса, невидимый символ в дампе и т.д. Неудобством таких ситуаций является то, что сообщение об ошибке не содержит исходный запрос. Действия по исправлению зависят от контекста возникновения ошибки. Таковых всего 3:

                                  1. Запрос в редакторе.

                                  Самый простейший случай — вы пишите свой запрос в редакторе. Если причина не опечатка, то:

                                    Смотреть в документации синтаксис команды для вашей версии сервера MySQL.

                                  Обратите внимание: речь идет о версии сервера MySQL, а не клиента (phpmyadmin, workbench и т.д.). Версию сервера можно узнать выполнив команду select version ( ) ;

                                  2. Перенос базы на другой сервер.

                                  У вас есть дамп (т.е. файл с расширением .sql) и при попытке его импортировать вы получаете ошибку 1064. Причины:

                                  В различных версиях набор ключевых слов и синтаксис может немного отличаться. Наиболее распространенный случай: команда create table, в которой ключевое слово type было заменено на engine. Например, если вы получаете ошибку:

                                  Это означает, что вы переносите базу в пятую версию сервера MySQL, в котором ключевое слово TYPE не поддерживается и его нужно заменить на ENGINE.

                                  Редко бываю случаи, когда перенос идет на старый (

                                  3.23) сервер, который кодировки не поддерживает. Тогда ошибка будет иметь вид:

                                  Такое может произойти, если вы переносите базу с хостинга на локальный комп, где стоит древняя версия MySQL. Лучшим решением в данном случае будет не править дамп, а обновить MySQL.

                                  Часто проблемы вызваны тем, что дамп делается неродными средствами MySQL (например, phpmyadmin) из-за чего в нем могут быть BOM-маркер, собственный синтаксис комментариев, завершения команды и т.д. Кроме того при использовании того же phpmyadmin возможна ситуация при которой из-за ограничения апача на размер передаваемого файла команда будет обрезана, что приведет к ошибке 1064. Например, если вы получаете ошибку:

                                  Значит ваш дамп содержит BOM-маркер. Это три байта в начале файла, помогающие программе определить что данный файл сохранен в кодировке UTF-8. Проблема в том, что MySQL пытается интерпретировать их как команду из-за чего возникает ошибка синтаксиса. Нужно открыть дамп в текстовом редакторе (например, Notepad++) и сохранить без BOM.

                                  Для избежания подобных проблем при создании дампа и его импорте лучше пользоваться родными средствами MySQL, см http://sqlinfo.ru/forum/viewtopic.php?id=583

                                  3. Некорректная работа сайта.

                                  Если во время работы сайта появляются ошибки синтаксиса, то, как правило, причина в установке вами сомнительных модулей к вашей cms. Лучшее решение — отказаться от их использования. Еще лучше предварительно проверять их работу на резервной копии.

                                  Пример. Движок dle 7.2, поставили модуль ,вроде бы все Ок, но:

                                  MySQL Error!
                                  ————————
                                  The Error returned was:
                                  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 ‘AND approve=’ 1 ‘ AND date 2008 -10 -04 04 : 34 : 25 ‘ LIMIT 5’ at line 1

                                  Error Number:
                                  1064
                                  SELECT id, title, date , category, alt_name, flag FROM dle_post WHERE MATCH ( title, short_story, full_story, xfields, title ) AGAINST ( ‘Приобретение и оплата скрипта ‘ ) AND id != AND approve= ‘1’ AND date ‘2008-10-04 04:34:25’ LIMIT 5

                                  В данном примере мы видим, что причина ошибки в отсутствии значения после «id != «

                                  Обратите внимание: из процитированного сервером MySQL куска запроса причина ошибки не ясна. Если ваша CMS не показывает весь запрос целиком, то нужно в скриптах найти место где выполняется данный запрос и вывести его на экран командой echo.

                                  Кусок кода, который отвечает за данный запрос это

                                  Далее можно искать откуда взялась переменная $row и почему в ней нет элемента ‘id’ и вносить исправления, но лучше отказаться от использования такого модуля (неизвестно сколько сюрпризов он еще принесет).

                                  Источник

                                  Форум пользователей MySQL

                                  Задавайте вопросы, мы ответим

                                  Страниц: 1

                                  #1 22.11.2010 05:31:00

                                  ERROR 1064 (42000) Я Полный чайник

                                  Прошу прощения у уважаемых пользователей, но я полный чайник, и почитав статьи по основам, не понимаю причины происхождения данной ошибки:

                                  ERROR 1064 (42000): 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 ‘IF EXISTS’ at line 1

                                  Стоит MySQL 5.1
                                  Импортирую схему именно для MySQL, правда, для какой версии — точно не знаю

                                  Подскажите, где ошибка в синтаксисе, и как он должен выглядеть, либо киньте ссылку, на поддерживаемые функции данной версии и их описание, пожалуйста

                                  Комментарий модератора.
                                  В статье ERROR 1064 (42000) объясняется, что означает ошибка сервера MySQL №1064, рассматриваются типичные ситуации и причины возникновения этой ошибки, а также даются рекомендации по исправлению.

                                  Отредактированно NewUse (22.11.2010 05:31:34)

                                  #2 22.11.2010 06:42:48

                                  Re: ERROR 1064 (42000) Я Полный чайник

                                  #3 23.11.2010 01:50:30

                                  Re: ERROR 1064 (42000) Я Полный чайник

                                  Да, спасибо, заработало, помогите, пожалуйста исправить ещё одну ошибочку такого же типа (несовместимость версий):
                                  Сайтик под предположительно php4+MySQL — версия ранняя 2004г или ранее:

                                  while ( $row = $query -> fetchRow ( ) ) <
                                  unset ( $ROW ) ;
                                  $row [ packet ] = «$row[packet] n » ;
                                  $TMP_ROW = «» » . $INDEX_PAGE [ edit ] . » » border=0> n » ;
                                  if ( $row [ action ] > 0 ) <
                                  $TMP_ROW .= » | » » . $INDEX_PAGE [ price ] . » » border=0> n » ;
                                  >
                                  $TMP_ROW .= » | » » . $NIBS_TEXT [ delete ] . » » border=0> n » ;
                                  $row [ action ] = $TMP_ROW ;
                                  $count = $db -> getRow ( «select count($username) as $username from users where gid=$row[gid]» ) ;
                                  $row [ num_users ] = $count [ $username ] ;
                                  $TOTAL_USER += $count [ $username ] ;
                                  $TRAF_ARRAY = $db -> GetRow ( «select sum(in_bytes) as in_bytes, sum(out_bytes) as out_bytes from » .NIBS_ACCT_TABLE. » where gid=» . $row [ gid ] ) ;
                                  $row [ gid ] = round ( $TRAF_ARRAY [ in_bytes ] / ( 1024 * 1024 ) , $ROUND_DIGIT ) . «/» ;
                                  $row [ gid ] .= round ( $TRAF_ARRAY [ out_bytes ] / ( 1024 * 1024 ) , $ROUND_DIGIT ) ;
                                  $TOTAL_IN += $TRAF_ARRAY [ in_bytes ] ;
                                  $TOTAL_OUT += $TRAF_ARRAY [ out_bytes ] ;
                                  while ( list ( $key , $val ) = each ( $row ) ) <
                                  if ( $HEADER ) <
                                  $TMP_HEADER [ ] = array ( VARS => $NIBS_TEXT [ $key ] ,
                                  TD_CLR => HDR_CLR,
                                  TH => true ) ;
                                  >
                                  $ROW [ ] = array ( VARS => $val ,
                                  TD_PAR => «align=middle» ,
                                  TD_CLR => DEF_CLR ) ;
                                  >
                                  if ( $HEADER ) <
                                  $HEADER = false ;
                                  $ARRAY [ ] = $TMP_HEADER ;
                                  >
                                  $ARRAY [ ] = $ROW ;

                                  PHP Fatal error: Call to a member function fetchRow() on a non-object in /usr/local/www/data/index.php on line 13

                                  #4 23.11.2010 01:59:31

                                  Re: ERROR 1064 (42000) Я Полный чайник

                                  Как следует из текста ошибки — Вы пытаетесь вызвать метод у сущности,
                                  не являющейся объектом. Задавайте, пожалуйста, вопросы по PHP на
                                  webew.ru.

                                  #5 23.11.2010 15:28:00

                                  Re: ERROR 1064 (42000) Я Полный чайник

                                  Спасибо, а такой синтаксис в MySQL5 допустим?

                                  Источник

                                  Понравилась статья? Поделить с друзьями:
                                • Ошибка 1064 sql как исправить
                                • Ошибка 1064 mysql как исправить
                                • Ошибка 1063 радмин впн
                                • Ошибка 1062 служба не запущена
                                • Ошибка 1062 при подключении к интернету как исправить