r> I was not aware of placeholders, and the benifits of using them instead of
r> using $dbh->quote(). It doesnt make sence that the DBI version of quote isnt
r> as thorough as having the code behind placeholding do it.
I'm not DBI guru but I've seen that quote() doesn't quote some data
correctly
That would not be true.
You'd receive a message stating that you had one placeholder, but you
were passing 3 arugments, and it script would die on the error.
havoc
ryc wrote:
>
> I was not aware of placeholders, and the benifits of using them instead of
> using $dbh->quote(). It doesnt make se
I was not aware of placeholders, and the benifits of using them instead of
using $dbh->quote(). It doesnt make sence that the DBI version of quote isnt
as thorough as having the code behind placeholding do it. But anyhow, I have
a few questions as to how this works. Here is an example from the Per
r> Seems that you are not taking advantage of Perl. This is what you can do:
No, he is taking advantage of placeholders. It is much better to use
placeholder for value substitution that substitute values directly
into query with Perl because there is no need to escape values (do you
know that $d
Seems that you are not taking advantage of Perl. This is what you can do:
$parentid = x;
$orderby = 'DESC';
my $sth = $dbh -> prepare (qq{
SELECT message.name, contents, user.name, message.id
FROM message, user
WHERE folder='N' and parentid=$parentid
GROUP B
Simple answer: you can't do that.
The ? is only for WHERE parameters. You need to have two differnt queries
(or one query, and concatanate the desired sort command).
j- k-
On Monday 09 July 2001 21:13, havoc wrote:
> I'm having some trouble passing some information from my Perl script
I'm having some trouble passing some information from my Perl script to
the DBI query interface.
A short version of my query would look like:
my $sth = $dbh -> prepare (q{
SELECT message.name, contents, user.name, message.id
FROM message, user
WHERE folder='N' and paren