Advantages of Stored Procedures.

MySQL stored procedures are programs that are not only stored, but executed on the MySQL server. They are, for the most part, logic that has been removed from the application and placed on the database server.There are several advantages while using
Stored procedures.
* As alluded to above, MySQL stored procedures can greatly cut down on the amount of traffic going back and forth over your network.
* Stored procedures can greatly improve the security of your database server. SQL that is executed on the server is not subject to SQL injection attacks.
* Stored procedures provide a way to abstract and separate data access routines from the business logic of your application.
* Stored procedures allow these routines to be accessed by programs using different platforms and API's, and make your applications more portable.
Here is a link which shows, how to create stored procedure in mysql and how to call it from a php page.
http://www.databasedesign-resource.com/ ... dures.html
Stored procedures.
* As alluded to above, MySQL stored procedures can greatly cut down on the amount of traffic going back and forth over your network.
* Stored procedures can greatly improve the security of your database server. SQL that is executed on the server is not subject to SQL injection attacks.
* Stored procedures provide a way to abstract and separate data access routines from the business logic of your application.
* Stored procedures allow these routines to be accessed by programs using different platforms and API's, and make your applications more portable.
Here is a link which shows, how to create stored procedure in mysql and how to call it from a php page.
http://www.databasedesign-resource.com/ ... dures.html