Esempio n. 1
0
 /**
  * 準備済みSQL文を作成する
  * (executeSQLを実行するため使用する)
  * <処理内容>
  * ・SQL文の解析エラーが発生したら、トランザクションをロールバックする
  * @access public
  * @param string $sql SQL文
  * @return object 準備済みSQL文
  * @throws DatabaseException SQL文の解析エラーが発生した時
  */
 function prepareSql($sql)
 {
     $sth =& $this->db->prepare($sql);
     if (DB::isError($sth)) {
         $this->db->rollback();
         throw new DatabaseException($sth->getMessage());
     }
     return $sth;
 }