 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Data
typing is also important and may need to
|
|
|
|
be
explicitly stated:
|
|
|
### No need for a data type for this
value. It's a string.
|
|
|
$sth->bind_param( 1,
$dbh->quote( "Avebury” ) );
|
|
|
### This one is obviously a number, so
no type again
|
|
|
$sth->bind_param( 2, 21 );
|
|
|
### However, this one is a string but
looks like a number
|
|
|
$sth->bind_param( 3,
$dbh->quote( 123500 ), { TYPE => SQL_VARCHAR } );
|
|
### Alternative short-hand form of the
previous statement
|
|
|
$sth->bind_param( 3,
$dbh->quote( 123500 ), SQL_VARCHAR );
|
|