Maybe Im doing this wrong, but the only way to ORDER BY or LIMIT in a mysql stored proc is to concat the whole query into a string, and then execute the string... what a load of sh*t!!!
Also another thing, what good is the IF-THEN-ELSE if you can use it within a single select statement... you have to rewrite the intire query.
If they cant get it right, why do it at all.
Sorry... needed to let of steam some steam - time to get a better database!!!