C:/lib/adodb/drivers/adodb-postgres9.inc.php Quellcode

adodb-postgres9.inc.php
gehe zur Dokumentation dieser Datei
1 <?php
2 /*
3  V5.19dev ??-???-2014 (c) 2000-2014 John Lim (jlim#natsoft.com). All rights reserved.
4  Released under both BSD license and Lesser GPL library license.
5  Whenever there is any discrepancy between the two licenses,
6  the BSD license will take precedence.
7  Set tabs to 4.
8 
9  Postgres9 support.
10  01 Dec 2011: gherteg added support for retrieving insert IDs from tables without OIDs
11 */
12 
13 // security - hide paths
14 if (!defined('ADODB_DIR')) die();
15 
16 include_once(ADODB_DIR."/drivers/adodb-postgres7.inc.php");
17 
19  var $databaseType = 'postgres9';
20 
21  function ADODB_postgres9()
22  {
23  $this->ADODB_postgres7();
24  }
25 
26  // Don't use OIDs, as they typically won't be there, and
27  // they're not what the application wants back, anyway.
28  function _insertid($table,$column)
29  {
30  if ( empty($table) || empty($column) ) {
31  if (!is_resource($this->_resultid) || get_resource_type($this->_resultid) !== 'pgsql result') return false;
32  if (function_exists('pg_getlastoid')) $oid = pg_getlastoid($this->_resultid);
33  else $oid = false;
34  return $oid;
35  }
36 
37  return $this->GetOne("SELECT currval(pg_get_serial_sequence('$table','$column'))");
38  }
39 }
40 
41 /*--------------------------------------------------------------------------------------
42  Class Name: Recordset
43 --------------------------------------------------------------------------------------*/
44 
46  var $databaseType = "postgres9";
47 
48  function ADORecordSet_postgres9($queryID,$mode=false)
49  {
50  parent::ADORecordSet_postgres7($queryID,$mode);
51  }
52 }
53 
55  var $databaseType = "postgres9";
56 
57  function ADORecordSet_assoc_postgres9($queryID,$mode=false)
58  {
59  parent::ADORecordSet_assoc_postgres7($queryID,$mode);
60  }
61 }
62 ?>




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.