perleager has asked for the wisdom of the Perl Monks concerning the following question:
I also tried taking out the %'s in the $sql varaible and typed "John*" in the $input{'clt'} field.use DBI; my $dbh = DBI->connect('DBI:mysql:CLTE') or die "Couldn't connect to +database: " . DBI->errstr; $sql = " SELECT * FROM clttable WHERE clt = '$INPUT{'clt'}%' #also tried replacing % with * charact +er. "; $sth = $dbh->prepare("$sql") or print "preparing: ",$dbh->errstr; $sth->execute or print "executing: ", $dbh->errstr; $row = $sth->fetchrow_hashref; $dbh->disconnect;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI and MySQL wild card function?
by Zaxo (Archbishop) on Oct 02, 2002 at 01:55 UTC | |
|
(jeffa) Re: DBI and MySQL wild card function?
by jeffa (Bishop) on Oct 02, 2002 at 01:57 UTC | |
by BUU (Prior) on Oct 02, 2002 at 03:13 UTC | |
by diotalevi (Canon) on Oct 02, 2002 at 03:44 UTC | |
by jeffa (Bishop) on Oct 02, 2002 at 05:51 UTC | |
by diotalevi (Canon) on Oct 02, 2002 at 06:33 UTC | |
by Anonymous Monk on Oct 02, 2002 at 11:51 UTC | |
by diotalevi (Canon) on Oct 02, 2002 at 15:45 UTC | |
|
Re: DBI and MySQL wild card function?
by diotalevi (Canon) on Oct 02, 2002 at 02:18 UTC | |
|
Re: DBI and MySQL wild card function?
by trs80 (Priest) on Oct 02, 2002 at 03:18 UTC |