Re: bind_param oddity?



On 11/22/06, Garrett, Philip (MAN-Corporate) <Philip.Garrett@xxxxxxxxxxx> wrote:
Kevin Spencer wrote:
> Hi guys,
>
> I'm sure I'm missing something *very* obvious but this one has me
> scratching my head. Using DBI 1.52, DBD::mysql 3.0007, Perl 5.8.8,
> MySQL 5.0.18.
>
[snip]
>
> my $SQL = <<EOSQL;
> select count(*) from ?
> where TRXSTATUS = ?
> and (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(TRXTIMESTAMP)) < ?
> EOSQL

You can't bind a table name -- binding is only for "value" types.

This is attempting to execute:
select count(*) from 'CCHISTORY' ... (which won't run in mysql either)

Philip, Christopher, Martin,

Thanks to all of you. That was indeed the problem. See, I knew it
was something obvious I was missing. Thanks again guys.

--
Kevin.
.



Relevant Pages

  • MySQL Deamon - is it running?
    ... After installing Fedora C3 I went to connect to MySQL. ... message about the mysql.sock file missing. ...
    (Fedora)
  • Re: a problem with mysql
    ... It's still saying it's missing the debian-sys-maint user and ... I had a problem with my password for mysql and then I deleted all files ... try to reinstall the package like that: ...
    (Ubuntu)
  • Re: SELECTing from an arry?
    ... I wansn't aware that Mysql dealt with flat files. ... You're missing the fact he only showed maybe 2% of his code, and that he's querying a MySQL database for rows that match the contents of the flat file. ...
    (comp.lang.php)
  • Re: SELECTing from an arry?
    ... I wansn't aware that Mysql dealt with flat files. ... You're missing the fact he only showed maybe 2% of his code, and that he's querying a MySQL database for rows that match the contents of the flat file. ...
    (comp.lang.php)
  • Re: SELECTing from an arry?
    ... I wansn't aware that Mysql dealt with flat files. ... You're missing the fact he only showed maybe 2% of his code, and that he's querying a MySQL database for rows that match the contents of the flat file. ...
    (comp.lang.php)