Re: Perl DBI to MySQL -- Passing info to query

2001-07-11 Thread Ilya Martynov
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

Re: Perl DBI to MySQL -- Passing info to query

2001-07-10 Thread havoc
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

Re: Perl DBI to MySQL -- Passing info to query

2001-07-10 Thread ryc
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

Re: Perl DBI to MySQL -- Passing info to query

2001-07-10 Thread Ilya Martynov
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

Re: Perl DBI to MySQL -- Passing info to query

2001-07-09 Thread ryc
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

Re: Perl DBI to MySQL -- Passing info to query

2001-07-09 Thread Joshua J. Kugler
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