Oreder by Param set in PDO


(Tanha) #1

hi
I have problem with pdo in set order by param dynamicaly in pdo.
sql = “Select * from mytable order by :param1”;

and

$command->bindParam(’:order’,‘id’)


(Anisrehan) #2

$command->bindParam(’:param1’,‘id’)
should resolve your problem