Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am looking to see a few good references on stored procedures with MySQL. A good number of applications demonstrate query-based and not much with routines/procedures. Is this the standard with MySQL? If that is the case, what is the arrangement to secure the application against any SQL Injection attacks?
Posted

If MySQL supports paramaterized queries, that is also safe. In general, there's less advice to always use procs, because it's not necessarily a speed benefit, nowadays. I still think it's a good idea a lot of the time to use procs, esp if you want to put the SQL in a data layer seperate from your code, so you can change it easily and clean your code base.
 
Share this answer
 
I wish its a good idea using stored procedures as a queries. as normal queries can be attacked easily as they can used for a sql injection; also it requires more code process to write it.
And its easy to change on later on if you upgrade it or change it.

some stored procedures sample example for mysql are-
stored procedure[^]
MySQl Stored Procedure[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900