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

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...