MySQL 2014 error (2014) commands out of sync; you can't run this command now command solve the problem of non-synchronization errors

Source: Internet
Author: User

Today, I am suffering from a MySQL 2014 error for a long time.

There is no solution to this problem. After my problem is solved, I found that this is caused by function usage and is not a MySQL bug.

Find an articleArticle, Very helpful

Command not synchronized

If the "command is not synchronized" error occursCodeYou are calling client functions in the wrong order.

For example, if you are using mysql_use_result () and want to execute a new query before calling mysql_free_result (), this problem occurs.

This problem also occurs if you try to execute two queries but do not call mysql_use_result () or mysql_store_result () between the two queries.

Summarize my questions,

In a SELECT statement, such as "select * from ...... "," Select func_xxx () "requires mysql_store_result () or mysql_use_result

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.