Babale Fongo wrote:
2) This works fine (with or without space in the string).
my $sth = $dbh->prepare(qq{
Select fname, lname, dob, substr(desc, 1, 200) from user
left join personal_data on
user.id = personal_data.id where gender = ? and position = ?
order by lname limit $limit
});
$sth->execute($gender, $role);
In the first example, DBI always passed the value for offset and ignored the
second value after the comma.
If you have 2 values, you need to "prepare" with two placeholders.
(I quoted "prepare" because a limit is not really preparable)
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/