>[EMAIL PROTECTED]
>Add $dbh -> trace( 4, "file" ); before the do() to see what DBI thinks
is
>happening.
>Mac :})
Thanks good idea!
Ok here's my modified perl : ( I did 2 instead of 4 becaus e4 didn't do
anything )
print $query;
$dbh->trace(2,"trace.txt");
$dbh->do($query) or die "Can not execute $query :" . $dbh->errstr .
"\n";
print $query;
Here is pasted in the output from the above two print $query bits :
DELETE FROM customer WHERE ID IN ('23','18')
DELETE FROM customer WHERE ID IN ('23','18')
Here is the content of the trace.txt
DBI::db=HASH(0x81bd0b4) trace level set to 2 in DBI 1.21-nothread
Note: perl is running without the recommended perl -w option
-> do for DBD::mysql::db (DBI::db=HASH(0x81bd03c)~0x81bd0b4
'DELETE FROM customer WHERE ID IN ('23','.18')')
<- do= 1 at mysql_man.cgi line 404
-> disconnect for DBD::mysql::db (DBI::db=HASH(0x81bd03c)~0x81bd0b4)
imp_dbh->svsock: 8141a44
<- disconnect= 1 at mysql_man.cgi line 47
-> DESTROY for DBD::mysql::db (DBI::db=HASH(0x81bd0b4)~INNER)
<- DESTROY= undef during global destruction
So for some reason the do() seems to be adding a '.' in front of all
ids except for the first one. No wonder it doesn't match the ids!
I tried a regex to remove periods -> =~ s/\.//g; before the
print statements and $query doesn't seem to have it when
printed out with or without the regex.
A few more answers anyway. But why the period added in the do()?