* The PEAR DB driver for PHP's ifx extension
* for interacting with Informix databases
*
- * PHP versions 4 and 5
+ * PHP version 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* @author Daniel Convissor <danielc@php.net>
* @copyright 1997-2007 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: ifx.php,v 1.75 2007/07/06 05:19:21 aharvey Exp $
+ * @version CVS: $Id$
* @link http://pear.php.net/package/DB
*/
* @author Daniel Convissor <danielc@php.net>
* @copyright 1997-2007 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version Release: 1.7.14RC1
+ * @version Release: 1.9.2
* @link http://pear.php.net/package/DB
*/
class DB_ifx extends DB_common
/**
* The quantity of transactions begun
*
- * {@internal While this is private, it cannot actually be designated
+ * {@internal While this is private, it can't actually be designated
* private in PHP 5 because it is directly accessed in the test suite.}}
*
* @var integer
// {{{ constructor
/**
- * This constructor calls <kbd>$this->DB_common()</kbd>
+ * This constructor calls <kbd>parent::__construct()</kbd>
*
* @return void
*/
- function DB_ifx()
+ function __construct()
{
- $this->DB_common();
+ parent::__construct();
}
// }}}
* See DB_result::fetchInto() for more information.
*
* This method is not meant to be called directly. Use
- * DB_result::fetchInto() instead. It cannot be declared "protected"
+ * DB_result::fetchInto() instead. It can't be declared "protected"
* because DB_result is a separate object.
*
* @param resource $result the query result resource
* Gets the number of columns in a result set
*
* This method is not meant to be called directly. Use
- * DB_result::numCols() instead. It cannot be declared "protected"
+ * DB_result::numCols() instead. It can't be declared "protected"
* because DB_result is a separate object.
*
* @param resource $result PHP's query result resource
* Deletes the result set and frees the memory occupied by the result set
*
* This method is not meant to be called directly. Use
- * DB_result::free() instead. It cannot be declared "protected"
+ * DB_result::free() instead. It can't be declared "protected"
* because DB_result is a separate object.
*
* @param resource $result PHP's query result resource
*/
function errorCode($nativecode)
{
- if (ereg('SQLCODE=(.*)]', $nativecode, $match)) {
+ if (preg_match('/SQLCODE=(.*)]/', $nativecode, $match)) {
$code = $match[1];
if (isset($this->errorcode_map[$code])) {
return $this->errorcode_map[$code];
*
* If analyzing a query result and the result has duplicate field names,
* an error will be raised saying
- * <samp>cannot distinguish duplicate field names</samp>.
+ * <samp>can't distinguish duplicate field names</samp>.
*
* @param object|string $result DB_result object from a query or a
* string containing the name of a table.
$count = @ifx_num_fields($id);
if (count($flds) != $count) {
- return $this->raiseError("cannot distinguish duplicate field names");
+ return $this->raiseError("can't distinguish duplicate field names");
}
if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) {