RE: bind_param oddity?



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)

Regards,
Philip
.



Relevant Pages

  • Re: getting DBI and ODBC to work with PERL and MYSQL data source
    ... and installed DBI and DBD::ODBC perl modules. ... experience issuing a SQL query through PERL to Mysql.. ...
    (comp.lang.perl.misc)
  • DBI / DBD / MySQL installation problem
    ... I used to run Red Hat 9, and had a perfect relationship with Perl, DBI, ... able to connect to MySQL from Perl via DBI. ... Running install for module Mysql ...
    (perl.dbi.users)
  • Re: Need help with Perl and MySQL database data load
    ... You are telling Perl that you're creating a package named ... > 'MySQL' with this line. ... I get the error message "Can't locate object method "connect" ... When I put that line, use DBI;, back in I then get an authentication ...
    (comp.lang.perl.misc)
  • Re: bind_param oddity?
    ... scratching my head. ... Using DBI 1.52, DBD::mysql 3.0007, Perl 5.8.8, ... MySQL 5.0.18. ...
    (perl.dbi.users)
  • Re: quer y about dbi
    ... If you plan to do a project with Perl / DBI / MySQL, ... And if you don't have yourself a good book on MySQL yet, ... Mail has the best spam protection around ...
    (perl.dbi.users)