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

后端 未结 8 2181
心在旅途
心在旅途 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 15:54

    Create an if-else condition.
    If(ascCondion ) then bind the values but hard code ORDER BY columnName ASC
    Else
    Bind the values but hard code ORDER BY COlumnName DESC

提交回复
热议问题