Esempio n. 1
0
 /**
  * batchQuery
  *
  * @param   AbstractDatabaseDriver $db
  * @param   array|string   $queries
  *
  * @return  boolean
  */
 public static function batchQuery(AbstractDatabaseDriver $db, $queries)
 {
     if (is_string($queries)) {
         $queries = $db->splitSql($queries);
     }
     foreach ((array) $queries as $query) {
         if (!trim($query)) {
             continue;
         }
         $db->setQuery($query)->execute();
     }
     return true;
 }