On Nov 22, 2006, at 12:10 PM, Kevin Spencer wrote:

Hi guys,
<snip>

Now, because I want use use placeholders instead, I attempt the following:

my $SQL = <<EOSQL;
select count(*) from ?
where TRXSTATUS = ?
and (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(TRXTIMESTAMP)) < ?
EOSQL

<snip>
Anyone see an obvious error in my code that I'm overlooking?

Thanks.

--
Kevin.

You can't replace table names with placeholders. The quick sort-of intuitive
explanation is that the database can cache an internal version of the
query with a execution plan, and can put in placeholder values at
execution time for constants, but it can't do this for table or column names, or for a different number of variables in "IN" lists (because this might parse
to a concatenation of 'OR' clauses, for example).

--
Christopher Sarnowski
[EMAIL PROTECTED]
Penn Bioinformatics Core
1316 Blockley Hall MC 6021
(215) 746-7784


Reply via email to