How do I set ORDER BY params using prepared PDO statement?

后端 未结 8 2204
心在旅途
心在旅途 2020-11-22 15:37

I\'m having problems using params in the ORDER BY section of my SQL. It doesn\'t issue any warnings, but prints out nothing.

$order = \'column         


        
8条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-22 16:08

    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.

提交回复
热议问题