bind_param - vars not literals

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I don't know if this is a mysql or php question (seems like a hybrid),
so I apologize now to anyone who's upset...  I get great stuff here,
so here I start.

I like to prep and bind all sql.  The bind_param in php (needs
variables as bind values.

select * from x where colname in (?,?,?,?...)

I can build the type string, "iiii", and can walk the values to
bind... but how can I actually bind values?  php wants vars.

I can't do these: $sth->bind_params("iiii", 1,2,3,4), or $sth-
Quoted text here. Click to load it

It appears that I might be able to use named binding parameters or I
could build var names and set them... but is that the only way?

If this is really a mysql question, please ignore.  I'll remove it in
a few days and repost over there (where ever it is)

Thank you. ... really

Re: bind_param - vars not literals

Quoted text here. Click to load it

holy hanna! =

Site Timeline