Exemple #1
0
 /** Change query bindings from named bindings to ? bindings */
 private static function rebindQuery($function, &$sql, &$bindings)
 {
     self::$bindings = $bindings;
     self::$newBindings = array();
     $sql = preg_replace_callback('/:[a-z0-9]*/i', array('Piwik_SiteSearch_Db', 'replaceBinding'), $sql);
     return call_user_func($function, $sql, self::$newBindings);
 }