How to use mysqli connection in php to obtain the mysql process list is similar to showprocesslist

Source: Internet
Author: User
In php, how does one use mysqli connection to obtain the mysql process List, which is similar to showprocesslist? Php version: 5.2.17 & nbsp; mysql version: 5.0.14 uses the connection method of mysqli. to obtain the list of current database processes, it is similar to executing & nbsp; in mysql; in PH php, how does one use mysqli connection to obtain the mysql process List, which is similar to show processlist?
Php version: 5.2.17

Mysql version: 5.0.14

The connection method of mysqli is used. to obtain the list of processes in the current database, it is similar to executing

PHP code
  Show processlist or mysql function mysql_list_processes


However, I searched the manual and found that the myqli connection does not have this function. I only found sqli ::$ thread_id, which cannot implement what I want.

Execute SQL show processlist in php and only return the ID of the current statement. I want to return the ID of all processes in the current database. what should I do? For more information, see! Thank you!



------ Solution --------------------
Haha. Use "show processlist" as an SQL statement so that php can call the mysql Query method.

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.