That's just disgusting....
On Dec 24, 2008 2:35 PM, "Aryeh Gregor" <Simetrical+wikilist@gmail.comSimetrical%2Bwikilist@gmail.com> wrote:
On Wed, Dec 24, 2008 at 2:19 PM, Daniel Friesen dan_the_man@telus.net wrote: > Agh noooo.... don't... I just looked, and you're right, they seem to rely on things like this for multi-DB support:
/** * Oracle specific code to handle it's lack of sanity * @access private */ function _rewrite_where($where_clause) {
preg_match_all('/\s*(AND|OR)?\s*([\w_.]++)\s*(?:(=|<[=>]?|>=?)\s*((?>'(?>[^']++|'')*+'|[\d-.]+))|((NOT )?IN\s*((?>'(?>[^']++|'')*+',? ?|[\d-.]+,? ?)*+)))/', $where_clause, $result, PREG_SET_ORDER); $out = ''; foreach ($result as $val)
Probably not a model we want to follow, although I don't think that using raw SQL is necessarily bad in principle (using string concatenation to include variables certainly is, though).
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia....