Merge branch 'master' of git://github.com/openemr/openemr
[openemr.git] / library / adodb / drivers / adodb-sapdb.inc.php
blob320671e836e24ea707fa5bf34021b166367fa839
1 <?php
2 /*
3 V4.20 22 Feb 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.
9 Latest version is available at http://php.weblogs.com/
11 SAPDB data driver. Requires ODBC.
15 if (!defined('_ADODB_ODBC_LAYER')) {
16 include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
18 if (!defined('ADODB_SAPDB')){
19 define('ADODB_SAPDB',1);
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.
29 function ADODB_SAPDB()
31 //if (strncmp(PHP_OS,'WIN',3) === 0) $this->curmode = SQL_CUR_USE_ODBC;
32 $this->ADODB_odbc();
36 SelectLimit implementation problems:
38 The following will return random 10 rows as order by performed after "WHERE rowno<10"
39 which is not ideal...
41 select * from table where rowno < 10 order by 1
43 This means that we have to use the adoconnection base class SelectLimit when
44 there is an "order by".
46 See http://listserv.sap.com/pipermail/sapdb.general/2002-January/010405.html
52 class ADORecordSet_sapdb extends ADORecordSet_odbc {
54 var $databaseType = "sapdb";
56 function ADORecordSet_sapdb($id,$mode=false)
58 $this->ADORecordSet_odbc($id,$mode);
62 } //define