On 7/30/06, michael cuthbertson <[EMAIL PROTECTED]> wrote:
I need to embed variable column names in my queries, such as
'colX > '2004-01-01' where 'X' is a variable.
bind_text will not do this.
Is there another way?

Yes, do another query. ;-)

Seriously, note that if you change the condition you will generate a
diferent SQL query, meaning it will use different optimization
techniques (like using a different index).
The bind API is for precompiled SQL statements, where the SQL parsing
is done before the actual database access, that is, changing a column
name will imply another precompile.

Best regards,
~Nuno Lucas


Thanks.
Michael

Reply via email to