Subversion Repositories Applications.gtt

Rev

Rev 94 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 187
Line 4... Line 4...
4
 
4
 
5
/**
5
/**
6
 * The PEAR DB driver for PHP's odbc extension
6
 * The PEAR DB driver for PHP's odbc extension
7
 * for interacting with databases via ODBC connections
7
 * for interacting with databases via ODBC connections
8
 *
8
 *
9
 * PHP versions 4 and 5
9
 * PHP version 5
10
 *
10
 *
11
 * LICENSE: This source file is subject to version 3.0 of the PHP license
11
 * LICENSE: This source file is subject to version 3.0 of the PHP license
12
 * that is available through the world-wide-web at the following URI:
12
 * that is available through the world-wide-web at the following URI:
13
 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
13
 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
Line 16... Line 16...
16
 *
16
 *
17
 * @category   Database
17
 * @category   Database
18
 * @package    DB
18
 * @package    DB
19
 * @author     Stig Bakken <ssb@php.net>
19
 * @author     Stig Bakken <ssb@php.net>
20
 * @author     Daniel Convissor <danielc@php.net>
20
 * @author     Daniel Convissor <danielc@php.net>
21
 * @copyright  1997-2005 The PHP Group
21
 * @copyright  1997-2007 The PHP Group
22
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
22
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
23
 * @version    CVS: $Id: odbc.php,v 1.78 2005/02/28 01:42:17 danielc Exp $
23
 * @version    CVS: $Id$
24
 * @link       http://pear.php.net/package/DB
24
 * @link       http://pear.php.net/package/DB
25
 */
25
 */
Line 26... Line 26...
26
 
26
 
27
/**
27
/**
Line 40... Line 40...
40
 *
40
 *
41
 * @category   Database
41
 * @category   Database
42
 * @package    DB
42
 * @package    DB
43
 * @author     Stig Bakken <ssb@php.net>
43
 * @author     Stig Bakken <ssb@php.net>
44
 * @author     Daniel Convissor <danielc@php.net>
44
 * @author     Daniel Convissor <danielc@php.net>
45
 * @copyright  1997-2005 The PHP Group
45
 * @copyright  1997-2007 The PHP Group
46
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
46
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
47
 * @version    Release: 1.7.6
47
 * @version    Release: 1.9.2
48
 * @link       http://pear.php.net/package/DB
48
 * @link       http://pear.php.net/package/DB
49
 */
49
 */
50
class DB_odbc extends DB_common
50
class DB_odbc extends DB_common
51
{
51
{
52
    // {{{ properties
52
    // {{{ properties
Line 151... Line 151...
151
 
151
 
152
    // }}}
152
    // }}}
Line 153... Line 153...
153
    // {{{ constructor
153
    // {{{ constructor
154
 
154
 
155
    /**
155
    /**
156
     * This constructor calls <kbd>$this->DB_common()</kbd>
156
     * This constructor calls <kbd>parent::__construct()</kbd>
157
     *
157
     *
158
     * @return void
158
     * @return void
159
     */
159
     */
160
    function DB_odbc()
160
    function __construct()
161
    {
161
    {
Line 162... Line 162...
162
        $this->DB_common();
162
        parent::__construct();
163
    }
163
    }
Line 264... Line 264...
264
        if (!$result) {
264
        if (!$result) {
265
            return $this->odbcRaiseError(); // XXX ERRORMSG
265
            return $this->odbcRaiseError(); // XXX ERRORMSG
266
        }
266
        }
267
        // Determine which queries that should return data, and which
267
        // Determine which queries that should return data, and which
268
        // should return an error code only.
268
        // should return an error code only.
269
        if (DB::isManip($query)) {
269
        if ($this->_checkManip($query)) {
270
            $this->affected = $result; // For affectedRows()
270
            $this->affected = $result; // For affectedRows()
271
            return DB_OK;
271
            return DB_OK;
272
        }
272
        }
273
        $this->affected = 0;
273
        $this->affected = 0;
274
        return $result;
274
        return $result;
Line 365... Line 365...
365
     *
365
     *
366
     * @see DB_result::free()
366
     * @see DB_result::free()
367
     */
367
     */
368
    function freeResult($result)
368
    function freeResult($result)
369
    {
369
    {
370
        return @odbc_free_result($result);
370
        return is_resource($result) ? odbc_free_result($result) : false;
371
    }
371
    }
Line 372... Line 372...
372
 
372
 
373
    // }}}
373
    // }}}
Line 479... Line 479...
479
                return '"' . str_replace('"', '""', $str) . '"';
479
                return '"' . str_replace('"', '""', $str) . '"';
480
        }
480
        }
481
    }
481
    }
Line 482... Line 482...
482
 
482
 
483
    // }}}
-
 
484
    // {{{ quote()
-
 
485
 
-
 
486
    /**
-
 
487
     * @deprecated  Deprecated in release 1.6.0
-
 
488
     * @internal
-
 
489
     */
-
 
490
    function quote($str)
-
 
491
    {
-
 
492
        return $this->quoteSmart($str);
-
 
493
    }
-
 
494
 
-
 
495
    // }}}
483
    // }}}
Line 496... Line 484...
496
    // {{{ nextId()
484
    // {{{ nextId()
497
 
485
 
498
    /**
486
    /**