SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Sep 2008
    Posts
    977
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stored procedure question

    Hi,

    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.

    bazz

  2. #2
    SitePoint Guru
    Join Date
    Sep 2008
    Posts
    977
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh..I just found this.

    http://dev.mysql.com/doc/refman/5.0/...daitem-B-4-1-7

    some more reading

    bazz
    Last edited by IBazz; Jan 15, 2011 at 12:12. Reason: spelling

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,216
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    1. same place views are stored

    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
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •