(Note: I don't use MySQL, so you might need to protect the identifiers with ` in that statement.)
I've been toying with the idea of creating something like select_function($function, $args), and maybe a more generic *_function($fname, $args, ...) (where * is where, like, etc). But there needs to be some work on the idea yet, like how to distinguish between string args and column names.[/quote]
Understood. It would be nice to have these methods available as more and more SQL is creeping into my app but appreciate this is a tricky one. TBH, the only function I'm really missing at the moment is count - I might just add select_count() to my extension for the time being.