Пример #1
0
 /**
  * MDB2Wrapper::query()
  *
  * MySQL/the MDB2-MySQL wrapper seems to not support prepared
  * statements for batch INSERT operations. Hence we have to execute
  * such and maybe other statements as a query.
  */
 public static function query($query)
 {
     if (!isset(MDB2Wrapper::$conn)) {
         MDB2Wrapper::create();
     }
     $affected_rows = MDB2Wrapper::$conn->query($query);
     if (PEAR::isError($affected_rows)) {
         die("statement: " . $affected_rows->getMessage() . "<br />{$query}");
     }
     MDB2Wrapper::$connCounter += 1;
 }