Example #1
0
 /**
  * INSERT SELECT wrapper
  * $varMap must be an associative array of the form array( 'dest1' => 'source1', ...)
  * Source items may be literals rather than field names, but strings should
  * be quoted with Database::addQuotes().
  * @param string $destTable
  * @param array|string $srcTable May be an array of tables.
  * @param array $varMap
  * @param array $conds May be "*" to copy the whole table.
  * @param string $fname
  * @param array $insertOptions
  * @param array $selectOptions
  * @return null|ResultWrapper
  * @throws Exception
  */
 public function insertSelect($destTable, $srcTable, $varMap, $conds, $fname = __METHOD__, $insertOptions = array(), $selectOptions = array())
 {
     $this->mScrollableCursor = false;
     try {
         $ret = parent::insertSelect($destTable, $srcTable, $varMap, $conds, $fname, $insertOptions, $selectOptions);
     } catch (Exception $e) {
         $this->mScrollableCursor = true;
         throw $e;
     }
     $this->mScrollableCursor = true;
     return $ret;
 }