Hytham Shehab wrote at Fri, 08 Jun 2001 15:10:19 +0200: > hi all of u, > i got a simple question, why (1) is valid, however, (2) is not ?!! > (1) sorting order is explicity typed in the query statement: > $sth = $dbh->prepare("select student_name from students order by first_name > asc"); > $sth->execute(); > (2) sorting order is passed as a bind parameter: > $sort = 'asc'; > $sth = $dbh->prepare("select student_name from students order by first_name $sort"); > $sth->execute($sort); ^^^^^
That's the problem! I assume you wanted to write $sth->execute(); Cheerio, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]