MySQL Forums
Forum List  »  General

Prepared Statements
Posted by: Brian Cameros
Date: April 06, 2005 11:44AM

Is it possible to bind arrays to a prepared statement? Something like this:

SELECT id, name from blah WHERE id in ?

And then bind a set of ids to that question mark. I'm guessing it's not possible, and so I have a followup question:

Let's say that I have a SQL query, but I've already limited the set of ids to which I want the query applied. If there any way to pass that information into MySQL without building a (string) query like

SELECT id, name from blah WHERE id in (2,5,8,9) etc.

The id set passed into the query could be quite large (1,000s of ids), and I'm not sure I wouldn't overrun a buffer or run into performance problems parsing the SQL string...

Thanks for any help,
Brian

Options: ReplyQuote


Subject
Written By
Posted
Prepared Statements
April 06, 2005 11:44AM
April 07, 2005 06:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.