Re: [PHP-DB] PDO bindValue ORDER BY

2008-11-02 Thread Chris
Chris wrote: Matthew Peltzer wrote: ok... this makes more sense now. I know in the past I tried to do something similar with table names in the WHERE clause, and that didn't work in the same manner. Is there a better way to do what I'm trying to do? that is, sorting within the SQL statement ba

Re: [PHP-DB] PDO bindValue ORDER BY

2008-11-02 Thread Chris
Matthew Peltzer wrote: ok... this makes more sense now. I know in the past I tried to do something similar with table names in the WHERE clause, and that didn't work in the same manner. Is there a better way to do what I'm trying to do? that is, sorting within the SQL statement based on a suppl

Re: [PHP-DB] PDO bindValue ORDER BY

2008-11-01 Thread Post TUDBC
Your workaround is probably what I would do myself. Note: mysql_real_escape_string() is technically expecting a "string value", although there is no harm using it, and it's not a bad idea to avoid possible SQL malicious codes. Alternately, you can also write a simple function using regular express

Re: [PHP-DB] PDO bindValue ORDER BY

2008-11-01 Thread Matthew Peltzer
ok... this makes more sense now. I know in the past I tried to do something similar with table names in the WHERE clause, and that didn't work in the same manner. Is there a better way to do what I'm trying to do? that is, sorting within the SQL statement based on a supplied column name without o

Re: [PHP-DB] PDO bindValue ORDER BY

2008-10-31 Thread Post TUDBC
Technically, bound parameter is expecting a value, such as WHERE ID=:id However, ORDER BY is followed by a field name, such as ORRDER BY ID So I don't think it should work. If it does work, then it is a sign that the database driver is not really preparing the statement (as it should for pe