[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/adodb/drivers/ -> adodb-postgres8.inc.php (source)

   1  <?php
   2  /*
   3   @version   v5.20.3  01-Jan-2016
   4   @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
   5   @copyright (c) 2014      Damien Regad, Mark Newnham and the ADOdb community
   6    Released under both BSD license and Lesser GPL library license.
   7    Whenever there is any discrepancy between the two licenses,
   8    the BSD license will take precedence.
   9    Set tabs to 4.
  10  
  11    Postgres8 support.
  12  */
  13  
  14  // security - hide paths
  15  if (!defined('ADODB_DIR')) die();
  16  
  17  include_once(ADODB_DIR."/drivers/adodb-postgres7.inc.php");
  18  
  19  class ADODB_postgres8 extends ADODB_postgres7
  20  {
  21      var $databaseType = 'postgres8';
  22  
  23  
  24      /**
  25       * Retrieve last inserted ID
  26       * Don't use OIDs, since as per {@link http://php.net/function.pg-last-oid php manual }
  27       * they won't be there in Postgres 8.1
  28       * (and they're not what the application wants back, anyway).
  29       * @param string $table
  30       * @param string $column
  31       * @return int last inserted ID for given table/column, or the most recently
  32       *             returned one if $table or $column are empty
  33       */
  34  	function _insertid($table, $column)
  35      {
  36          return empty($table) || empty($column)
  37              ? $this->GetOne("SELECT lastval()")
  38              : $this->GetOne("SELECT currval(pg_get_serial_sequence('$table', '$column'))");
  39      }
  40  }
  41  
  42  class ADORecordSet_postgres8 extends ADORecordSet_postgres7
  43  {
  44      var $databaseType = "postgres8";
  45  }
  46  
  47  class ADORecordSet_assoc_postgres8 extends ADORecordSet_assoc_postgres7
  48  {
  49      var $databaseType = "postgres8";
  50  }


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1