Jump to content
Larry Ullman's Book Forums

Can Mix Prepared Statements With Regular Queries?


Recommended Posts

Can regular queries can be mixed with prepared statements?

 

If we decide to use prepared statements should we stick with them for every task, even if can be done faster or easier with regular queries? For example in your book when you check if a user is registred or not or if we populate a drop-down menu from database... The first example assume interaction with the user, the second example does not.

 

I would be interested not only if it is possible (I guess it is possible) but what constitues the best practice? Start with prepared statements stick with them?

Link to comment
Share on other sites

You can mix regular queries with prepared statements. In fact, I *think* I do it in one script in the 4th edition of the book (but I could be wrong). Largely this is a matter of personal preference. To me, the most important thing is to find an approach you like and stick with it consistently.

  • Upvote 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...