Jump to content
Larry Ullman's Book Forums

Prepared Statements With In Operator


Recommended Posts

Hello forum members,

 

here is a link to Stack Overflow which demonstrates how to use prepared statements with the IN operator:

 

http://stackoverflow.com/questions/11938876/mysqli-prepared-statements-with-in-operator

 

Could someone please have a look at the post (the first answer)? Would you recommended this technique or should I use something else?

 

 

Thank you!

Link to comment
Share on other sites

I have a set of prepared statement functions that I wrote that do something very similar.

The SO answer is a basic (but not ideal) solution to the problem of being able to write a function that allows you to execute a prepared statement on any query with a dynamic number of parameters.

 

Point being, I think the code in the SO answer (by the author's own admission) is a bit sloppy, but the concept is sound and it works.

Link to comment
Share on other sites

 

Point being, I think the code in the SO answer (by the author's own admission) is a bit sloppy, but the concept is sound and it works.

 

 

HartleySan, thank you very much for getting back to me. I think I'll need to use a similar technique for the time being.

 

I appreciate your help and hope you're well. Cheers.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...