Sorting in prepared queries

November 26th, 2006

I'm trying to get prepared queries to take an order by sort parameter, either ASC or DESC. The problem I am running into is that both ASC and DESC are not integers, but the shouldn't get quoted when passed to the database. I've gotten around this in the past by calling it an integer, but I guess MDB2 checks the type (no it doesn't). Argh. I'm looking at bindValue or bindParam as a possibility, but I don't think that will work.

From what I've gathered, MySQL simply doesn't support wildcard substitution of the ASC or DESC keywords. That's kind lame, but I imagine it was a "bug" in metabase that allowed me to do it before.

Yearly Indexes: 2003 2004 2006 2007 2008 2009 2010 2011 2012 2013 2015 2019 2020 2022