Select query's order not working in prepared statement

前端 未结 2 758
野的像风
野的像风 2021-01-23 06:11

I am created a prepared select query and it appears the query is not picking up the DESC or I have the bind_param structured wrong. I am trying to get

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-23 06:26

    I don't think you can :

    • Use placeholders in an order by clause
    • Bind column names : you can only bind values -- or variables, and have their value injected in the prepared statement.

    You can use number instead of field name in the 'order by' clause

提交回复
热议问题