]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/WikiDB/adodb/drivers/adodb-sapdb.inc.php
Reformat code
[SourceForge/phpwiki.git] / lib / WikiDB / adodb / drivers / adodb-sapdb.inc.php
1 <?php
2 /*
3 V4.22 15 Apr 2004  (c) 2000-2004 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 for best viewing.
8
9   Latest version is available at http://php.weblogs.com/
10
11   SAPDB data driver. Requires ODBC.
12
13 */
14
15 if (!defined('_ADODB_ODBC_LAYER')) {
16     include(ADODB_DIR . "/drivers/adodb-odbc.inc.php");
17 }
18 if (!defined('ADODB_SAPDB')) {
19     define('ADODB_SAPDB', 1);
20
21     class ADODB_SAPDB extends ADODB_odbc
22     {
23         var $databaseType = "sapdb";
24         var $concat_operator = '||';
25         var $sysDate = 'DATE';
26         var $sysTimeStamp = 'TIMESTAMP';
27         var $fmtDate = "\\D\\A\\T\\E('Y-m-d')"; /// used by DBDate() as the default date format used by the database
28         var $fmtTimeStamp = "\\T\\I\\M\\E\\S\\T\\A\\M\\P('Y-m-d','H:i:s')"; /// used by DBTimeStamp as the default timestamp fmt.
29
30         function ADODB_SAPDB()
31         {
32             //if (strncmp(PHP_OS,'WIN',3) === 0) $this->curmode = SQL_CUR_USE_ODBC;
33             $this->ADODB_odbc();
34         }
35
36         /*
37             SelectLimit implementation problems:
38
39              The following will return random 10 rows as order by performed after "WHERE rowno<10"
40              which is not ideal...
41
42                   select * from table where rowno < 10 order by 1
43
44               This means that we have to use the adoconnection base class SelectLimit when
45               there is an "order by".
46
47             See http://listserv.sap.com/pipermail/sapdb.general/2002-January/010405.html
48          */
49
50     }
51
52     ;
53
54     class  ADORecordSet_sapdb extends ADORecordSet_odbc
55     {
56
57         var $databaseType = "sapdb";
58
59         function ADORecordSet_sapdb($id, $mode = false)
60         {
61             $this->ADORecordSet_odbc($id, $mode);
62         }
63     }
64
65 } //define