Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- bind_param - vars not literals
January 16, 2012, 9:09 pm
rate this thread
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-
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
- » php with openssl in static mode (binaries for windows)
- — Previous thread in » PHP Scripting Forum