Home  >  Article  >  Backend Development  >  PHP calls the mysql stored procedure to return the result set

PHP calls the mysql stored procedure to return the result set

WBOY
WBOYOriginal
2016-07-25 08:42:17951browse
  1. $db = new mysqli('localhost', 'root','', 'mydatabase');
  2. $result = $db->query('CALL get_employees()');
  3. while (list($employee_id, $name, $position) = $result->fetch_row()) {
  4. echo '$employeeid, $name, $position
    ';
  5. }
  6. ?>
复制代码
存储过程, php, mysql


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:PHP counts online usersNext article:PHP counts online users