SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Oct 2006
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL Stored Procedure Pass Array of Ids into it

    I need to pass Array of Ids into it MySQL Stored Procedure, is this possible? I am running mysql 5.1.20.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,341
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    yes, pass them in as a VARCHAR of comma-delimited values
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Addict
    Join Date
    Oct 2006
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am looking at links here:
    http://forums.mysql.com/read.php?98,...2857#msg-82857
    http://forge.mysql.com/snippets/view.php?id=4

    I need to create a temp table and put the comma delimited values into that table.

    If lot of people are calling the procedrue split_string, does it mean
    only one will be executed at a time and rest of the request will be dropped?

    would split_string will forked to create many process to handle the request?

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,341
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    why do you need to create a temp table?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Addict
    Join Date
    Oct 2006
    Posts
    216
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess you don't need temp table, pass a big string with comma delimited as varchar.


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
  •