How to write a stored procedure in phpMyAdmin?

后端 未结 4 1492
青春惊慌失措
青春惊慌失措 2020-11-28 05:08

I am not able to find where to write the stored procedure in phpMyAdmin and how to call it using MVC architecture.

4条回答
  •  自闭症患者
    2020-11-28 05:35

    you can create a stored procedure in the sql query window on the phpmyadmin as you write any other query. And as soon as you execute the SP, it will be stored in the database's information_schema. You can check the existence of SP by the following commands:

    SHOW PROCEDURE STATUS
    SHOW FUNCTION STATUS
    

    and

    SELECT ROUTINE_NAME 
    FROM INFORMATION_SCHEMA.ROUTINES 
    WHERE 
           ROUTINE_TYPE="PROCEDURE" 
       AND ROUTINE_SCHEMA="dbname"
    ;
    

提交回复
热议问题