and the output, oddly enough is:use strict; use DBI; $dbh = DBI->connect("DBI:mysql:gds:localhost", "tools", "obviouslyfake +passwd") or die ("No love for the DBI connect"); $sql = qq{ SELECT uname, fname, fgroup, dmod, accts FROM noctracker WH +ERE uname = 'gwalker'} ; $sth = $dbh->prepare( $sql ) or die ("Could not prepare select"); $sth->execute(); $sth->bind_columns( undef, \$uname, \$fname, \$fgroup, \$dmod, \$accts + ); while ( $sth->fetch ) { print "<BR> Matched username $uname for name: $fname "; } $sth->finish(); $rc = $dbh->disconnect or die ("No love for the DBI disconnect"); &footer; exit;
Which is not what expected... that query works from the msql command line...DBI::st=HASH(0x164ad0) Matched username for name:
mysql> SELECT uname, fname, fgroup, dmod, accts FROM noctracker WHERE +uname = 'gwalker'; +---------+----------------+---------+---------------+---------------- +---------------+ | uname | fname | fgroup | dmod | accts + | +---------+----------------+---------+---------------+---------------- +---------------+ | gwalker | Glen G. Walker | GDS-NOC | 20030820 1700 | BASTION SECUREI +D THEQ CLARIFY | +---------+----------------+---------+---------------+---------------- +---------------+ 1 row in set (0.00 sec)
In reply to Another meek DBI question by coyotlgw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |