Jump to content
Larry Ullman's Book Forums

How To Bind Param To The Order By In Mysqli Prepared?


Recommended Posts

A prepared statement allows you to use placeholders (instead of values or variables) in your query on initial set up. The values are then sent when you are ready to execute the query. I can't think of a situation where you would need to use a placeholder in an ORDER BY clause. Could you be more specific about what you are trying to achieve?

Link to comment
Share on other sites

Well, Bahaa, I was going to answer it the other day but the answer might depend upon the version of MySQL, which you don't provide, even though this is in the forum guidelines. And your second post is a clear violation of the forum guidelines. You've been using these forums long enough that it's truly time you actually start following the forum guidelines.

Link to comment
Share on other sites

Well, Bahaa, I was going to answer it the other day but the answer might depend upon the version of MySQL, which you don't provide, even though this is in the forum guidelines. And your second post is a clear violation of the forum guidelines. You've been using these forums long enough that it's truly time you actually start following the forum guidelines.

Well, I did not know that the prepared statement depend upon the version of Mysql I use. I thought as long as the version I have support Mysqli prepared statement, then I would not have a problem on how to construct my query. In my opinion, if you indicate such things in your answers and give both solution, it would be a good resources for other members and they would have less problems in their application.

 

When I posted the second query, I did not mean to violate the guidelines. I read the the guidelines before and I read where it says not to add another post if it doesn't add anything to the thread. I waited 3 days and since I saw you answered some questions that have been posted after my post, I thought you did not notice thread or something and that is why I add the second post.

 

Anyway the version I use is 5.0.7

Link to comment
Share on other sites

 Share

×
×
  • Create New...