in reply to DBI and MySQL wild card function?
You want the LIKE function.:
my $sql = 'SELECT * FROM clttable WHERE clt LIKE ?'; my $sth = $dbi->prepare $sql;
LIKE patterns are simple, _ is wild for a single character, % matches any number including none.
I set this up with a placeholder so you don't need to prepare each query.
$sth->execute('John*');Update Oops, mixed patterns with shell in my head, repaired.
After Compline,
Zaxo
|
|---|