How PHP uses the mysqli connection to get a list of MySQL processes is similar to show processlist

Source: Internet
Author: User
Tags mysql query
How does PHP use the mysqli connection to get a list of MySQL processes, just like show processlist?
PHP Version: 5.2.17

MySQL version: 5.0.14

Using the Mysqli connection method, want to achieve the current database process list of functions, is similar to the implementation of MySQL

PHP Code
  
  Show Processlist  or MySQL's function mysql_list_processes


But I found the manual. The MYQLI connection does not have this function, only found the Sqli:: $thread _id, this also does not achieve what I want.

Executing SQL show processlist in PHP only returns the ID of the current statement, and I want to return all the process IDs of the current database. Trouble to know the help of the answer! Reply



------Solution--------------------
Oh. "Show processlist" as SQL, let PHP inside call MySQL Query method is ok
  • 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.