Hi, I'm having problem's trying to dynamically create an IN statement with
for MySQL. I'm using Activestate Perl 5.6, MySQL server 3.23.32, MySQL
client 3.23.22, and DBI 1.14 all under Windows 2000 Professional. I want my
SQL statement to look like this:
$sth_provider = $dbh->prepare("SELECT provider
FROM provider
WHERE provider.status = ?
AND provider_type in (?)");
$sth_provider->execute('OK', $prov_types) || die "Can't select PROVIDER
row(s): $DBI::errstr";
The SQL works as long as the $prov_types variable contains only one numeric
value. However, when it contains two or more values (eg. $prov_types = '1,
2, 4') I only get the records associated with the first value (1) in the
list. I've tried specifying the IN values just about every way I can, but I
still get the same results. Anyone have any thoughts / ideas? Thanks in
advance,
C. Duncan Hudson
Dynax Solutions, Inc.
Tel 216.292.8203
FAX 216.292.8273
EMail [EMAIL PROTECTED]