1   <?php
  2   /*
  3    V1.40 19 September 2001 (c) 2000, 2001 John Lim (jlim@natsoft.com.my). 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     Postgres7 support.
  10     28 Feb 2001: Currently indicate that we support LIMIT
  11   */
  12  
  13   include_once(ADODB_DIR."/adodb-postgres.inc.php");
  14  
  15   class ADODB_postgres7 extends ADODB_postgres {
  16           var $databaseType = 'postgres7';        
  17           var $hasLimit = true;   // set to true for pgsql 6.5+ only. support pgsql/mysql SELECT * FROM TABLE LIMIT 10
  18  
  19           function ADODB_postgres7()
  20           {
  21           }
  22  
  23           function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$arg3=false,$secs2cache=0)
  24           {
  25                   $offsetStr = ($offset >= 0) ? " OFFSET $offset" : '';
  26                   return $secs2cache ?
  27                           $this->CacheExecute($secs2cache,$sql." LIMIT $nrows$offsetStr",$inputarr,$arg3)
  28                   :
  29                           $this->Execute($sql." LIMIT $nrows$offsetStr",$inputarr,$arg3);
  30           }
  31   }
  32           
  33   /*--------------------------------------------------------------------------------------
  34            Class Name: Recordset
  35   --------------------------------------------------------------------------------------*/
  36  
  37   class ADORecordSet_postgres7 extends ADORecordSet_postgres{
  38  
  39           var $databaseType = "postgres7";
  40  
  41           function ADORecordSet_postgres7($queryID) {
  42                   $res=$this->ADORecordSet_postgres($queryID);
  43                   return $res;
  44           }
  45  
  46   }
  47   ?>