I am not able to find where to write the stored procedure in phpMyAdmin and how to call it using MVC architecture.
我无法找到在phpMyAdmin中编写存储过程的位置以及如何使用MVC架构调用它。
4 个解决方案
#1
25
In phpMyAdmin you can create the stored procedure in the SQL window.
在phpMyAdmin中,您可以在SQL窗口中创建存储过程。
You may have to set the delimieter to something like "$$" instead of the default ";". You can change this from the bottom of the SQL window.
您可能必须将分隔符设置为“$$”而不是默认的“;”。您可以从SQL窗口的底部更改此设置。
Also you can refer this: http://www.mysqltutorial.org/mysql-stored-procedure-tutorial.aspx
您也可以参考:http://www.mysqltutorial.org/mysql-stored-procedure-tutorial.aspx
#2
49
You can easily create procedures in phpMyAdmin.
您可以在phpMyAdmin中轻松创建过程。
- Go to your database. Click 'Routines' tab in header
- 转到您的数据库。单击标题中的“例程”选项卡
- Click on 'Add routine'
- 点击“添加例程”
- Then a popup window will be opened. In that write your procedure and click on "GO"
- 然后会打开一个弹出窗口。在那里编写你的程序并点击“GO”
For example like follows.
例如如下。
That's it. You can view your created procedures under 'Routines' tab itself.
而已。您可以在“例程”选项卡下查看创建的过程。
#3
3
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:
您可以在编写任何其他查询时在phpmyadmin的sql查询窗口中创建存储过程。一旦执行SP,它就会存储在数据库的information_schema中。您可以通过以下命令检查SP的存在:
SHOW PROCEDURE STATUS
SHOW FUNCTION STATUS
and
和
SELECT ROUTINE_NAME
FROM INFORMATION_SCHEMA.ROUTINES
WHERE
ROUTINE_TYPE="PROCEDURE"
AND ROUTINE_SCHEMA="dbname"
;
#4
0
STORED PROCEDURES are written using normal SQL language in the SQL box available in phpmyadmin->database->table->execute sql
在phpmyadmin-> database-> table-> execute sql中可用的SQL框中使用普通SQL语言编写存储过程
Refer this: - http://dev.mysql.com/doc/refman/5.0/en/stored-routines.html
请参阅: - http://dev.mysql.com/doc/refman/5.0/en/stored-routines.html
#1
25
In phpMyAdmin you can create the stored procedure in the SQL window.
在phpMyAdmin中,您可以在SQL窗口中创建存储过程。
You may have to set the delimieter to something like "$$" instead of the default ";". You can change this from the bottom of the SQL window.
您可能必须将分隔符设置为“$$”而不是默认的“;”。您可以从SQL窗口的底部更改此设置。
Also you can refer this: http://www.mysqltutorial.org/mysql-stored-procedure-tutorial.aspx
您也可以参考:http://www.mysqltutorial.org/mysql-stored-procedure-tutorial.aspx
#2
49
You can easily create procedures in phpMyAdmin.
您可以在phpMyAdmin中轻松创建过程。
- Go to your database. Click 'Routines' tab in header
- 转到您的数据库。单击标题中的“例程”选项卡
- Click on 'Add routine'
- 点击“添加例程”
- Then a popup window will be opened. In that write your procedure and click on "GO"
- 然后会打开一个弹出窗口。在那里编写你的程序并点击“GO”
For example like follows.
例如如下。
That's it. You can view your created procedures under 'Routines' tab itself.
而已。您可以在“例程”选项卡下查看创建的过程。
#3
3
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:
您可以在编写任何其他查询时在phpmyadmin的sql查询窗口中创建存储过程。一旦执行SP,它就会存储在数据库的information_schema中。您可以通过以下命令检查SP的存在:
SHOW PROCEDURE STATUS
SHOW FUNCTION STATUS
and
和
SELECT ROUTINE_NAME
FROM INFORMATION_SCHEMA.ROUTINES
WHERE
ROUTINE_TYPE="PROCEDURE"
AND ROUTINE_SCHEMA="dbname"
;
#4
0
STORED PROCEDURES are written using normal SQL language in the SQL box available in phpmyadmin->database->table->execute sql
在phpmyadmin-> database-> table-> execute sql中可用的SQL框中使用普通SQL语言编写存储过程
Refer this: - http://dev.mysql.com/doc/refman/5.0/en/stored-routines.html
请参阅: - http://dev.mysql.com/doc/refman/5.0/en/stored-routines.html