Stored procedure question


I want to know about Stored Procedures.

  1. are they created in my db software - heidisql or PhpMyAdmin? I mean, where is the procedure stored.

  2. having set up such a thing, (technical expression, I know), is the manner in which a script would interact with it, such that a set of params would be passed to the SP and it then process the query with those params?

  3. how does that offer any more security than just having a query in my script, where the params are cleaned and cleaned and checked before the query can be run?

If this sounds like a, ‘please work all this out for me’ type question, it isn’t meant to be. Links to easily explained tutorials would suffice. I have read the docs but can’t seem to find the answers to these questions.


Oh…I just found this.

some more reading :slight_smile:


  1. same place views are stored :slight_smile:

  2. yes, that’s the general idea – and the stored proc can be very complex, involving many queries, so you can effectively isolate all that code and logic, and simply “call” it from wherever it’s needed in the application

  3. reusability in the app