equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Db |
16 * @package Zend_Db |
17 * @subpackage Statement |
17 * @subpackage Statement |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Pdo.php 24593 2012-01-05 20:35:02Z matthew $ |
20 * @version $Id$ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see Zend_Db_Statement |
24 * @see Zend_Db_Statement |
25 */ |
25 */ |
32 * are re-thrown as Zend_Db_Statement_Exception. |
32 * are re-thrown as Zend_Db_Statement_Exception. |
33 * |
33 * |
34 * @category Zend |
34 * @category Zend |
35 * @package Zend_Db |
35 * @package Zend_Db |
36 * @subpackage Statement |
36 * @subpackage Statement |
37 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
37 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
38 * @license http://framework.zend.com/license/new-bsd New BSD License |
38 * @license http://framework.zend.com/license/new-bsd New BSD License |
39 */ |
39 */ |
40 class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggregate |
40 class Zend_Db_Statement_Pdo extends Zend_Db_Statement implements IteratorAggregate |
41 { |
41 { |
42 |
42 |
229 } else { |
229 } else { |
230 return $this->_stmt->execute(); |
230 return $this->_stmt->execute(); |
231 } |
231 } |
232 } catch (PDOException $e) { |
232 } catch (PDOException $e) { |
233 require_once 'Zend/Db/Statement/Exception.php'; |
233 require_once 'Zend/Db/Statement/Exception.php'; |
234 throw new Zend_Db_Statement_Exception($e->getMessage(), (int) $e->getCode(), $e); |
234 $message = sprintf('%s, query was: %s', $e->getMessage(), $this->_stmt->queryString); |
|
235 throw new Zend_Db_Statement_Exception($message, (int) $e->getCode(), $e); |
235 } |
236 } |
236 } |
237 } |
237 |
238 |
238 /** |
239 /** |
239 * Fetches a row from the result set. |
240 * Fetches a row from the result set. |