in reply to Strange problem with DBI placeholders
Have you tryed coercing the type correctly?
I know that I've done this in the past, since I have code samples in front of me where it is present but honestly I can't remember why I believed it was necessary right now!
Here is my suggestion:
use DBI qw/ :sql_types / ; # Database interface my $h_sql1 = $db_inv->prepare_cached( "select items from item_a where item_code = ? and item_stock = ?" ) or die $DBI::errstr; $h_sql1->bind_param( 1, "A0001" ); $h_sql1->bind_param( 2, 8, SQL_INTEGER ); $h_sql1->execute();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Strange problem with DBI placeholders
by Anonymous Monk on Sep 13, 2006 at 14:54 UTC |