]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/WikiDB/adodb/drivers/adodb-sapdb.inc.php
No tabs
[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     var $databaseType = "sapdb";
23     var $concat_operator = '||';
24     var $sysDate = 'DATE';
25     var $sysTimeStamp = 'TIMESTAMP';
26     var $fmtDate = "\\D\\A\\T\\E('Y-m-d')";     /// used by DBDate() as the default date format used by the database
27     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.
28
29     function ADODB_SAPDB()
30     {
31         //if (strncmp(PHP_OS,'WIN',3) === 0) $this->curmode = SQL_CUR_USE_ODBC;
32         $this->ADODB_odbc();
33     }
34
35     /*
36         SelectLimit implementation problems:
37
38          The following will return random 10 rows as order by performed after "WHERE rowno<10"
39          which is not ideal...
40
41               select * from table where rowno < 10 order by 1
42
43           This means that we have to use the adoconnection base class SelectLimit when
44           there is an "order by".
45
46         See http://listserv.sap.com/pipermail/sapdb.general/2002-January/010405.html
47      */
48
49 };
50
51
52 class  ADORecordSet_sapdb extends ADORecordSet_odbc {
53
54     var $databaseType = "sapdb";
55
56     function ADORecordSet_sapdb($id,$mode=false)
57     {
58         $this->ADORecordSet_odbc($id,$mode);
59     }
60 }
61
62 } //define
63 ?>