source: sandbox/2.5.1-evolucao/phpgwapi/inc/adodb/drivers/adodb-mssqlpo.inc.php @ 8222

Revision 8222, 1.5 KB checked in by angelo, 11 years ago (diff)

Ticket #3491 - Compatibilizar Expresso com novas versoes do PHP

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2/**
3* @version V5.18 3 Sep 2012 (c) 2000-2012 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*
8* Set tabs to 4 for best viewing.
9*
10* Latest version is available at http://php.weblogs.com
11*
12*  Portable MSSQL Driver that supports || instead of +
13*
14*/
15
16// security - hide paths
17if (!defined('ADODB_DIR')) die();
18
19
20/*
21        The big difference between mssqlpo and it's parent mssql is that mssqlpo supports
22        the more standard || string concatenation operator.
23*/
24       
25include_once(ADODB_DIR.'/drivers/adodb-mssql.inc.php');
26
27class ADODB_mssqlpo extends ADODB_mssql {
28        var $databaseType = "mssqlpo";
29        var $concat_operator = '||';
30       
31        function ADODB_mssqlpo()
32        {
33                ADODB_mssql::ADODB_mssql();
34        }
35
36        function PrepareSP($sql)
37        {
38                if (!$this->_has_mssql_init) {
39                        ADOConnection::outp( "PrepareSP: mssql_init only available since PHP 4.1.0");
40                        return $sql;
41                }
42                if (is_string($sql)) $sql = str_replace('||','+',$sql);
43                $stmt = mssql_init($sql,$this->_connectionID);
44                if (!$stmt)  return $sql;
45                return array($sql,$stmt);
46        }
47       
48        function _query($sql,$inputarr=false)
49        {
50                if (is_string($sql)) $sql = str_replace('||','+',$sql);
51                return ADODB_mssql::_query($sql,$inputarr);
52        }
53}
54
55class ADORecordset_mssqlpo extends ADORecordset_mssql {
56        var $databaseType = "mssqlpo";
57        function ADORecordset_mssqlpo($id,$mode=false)
58        {
59                $this->ADORecordset_mssql($id,$mode);
60        }
61}
62?>
Note: See TracBrowser for help on using the repository browser.