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 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 parentid=? > GROUP BY message.id > ORDER BY time ? > }) || die $dbh->errstr; > > Then, I'm calling the query: > > $sth->execute($parent, "DESC"); > > The "DESC" is being ignored. I can hard-code it into the query and it > works fine. The closest I've been able to achive in having the query > recognize the second ? is to have it crash with an error reporing that > it's there, but doing nothing about it.... > > go figure. > > any help is greatly appreciated. -- Joshua Kugler, Information Services Director Associated Students of the University of Alaska Fairbanks [EMAIL PROTECTED], 907-474-7601 --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php