1 |
efrain |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
* Portable MSSQL Driver that supports || instead of +.
|
|
|
4 |
*
|
|
|
5 |
* This file is part of ADOdb, a Database Abstraction Layer library for PHP.
|
|
|
6 |
*
|
|
|
7 |
* @package ADOdb
|
|
|
8 |
* @link https://adodb.org Project's web site and documentation
|
|
|
9 |
* @link https://github.com/ADOdb/ADOdb Source code and issue tracker
|
|
|
10 |
*
|
|
|
11 |
* The ADOdb Library is dual-licensed, released under both the BSD 3-Clause
|
|
|
12 |
* and the GNU Lesser General Public Licence (LGPL) v2.1 or, at your option,
|
|
|
13 |
* any later version. This means you can use it in proprietary products.
|
|
|
14 |
* See the LICENSE.md file distributed with this source code for details.
|
|
|
15 |
* @license BSD-3-Clause
|
|
|
16 |
* @license LGPL-2.1-or-later
|
|
|
17 |
*
|
|
|
18 |
* @copyright 2000-2013 John Lim
|
|
|
19 |
* @copyright 2014 Damien Regad, Mark Newnham and the ADOdb community
|
|
|
20 |
*/
|
|
|
21 |
|
|
|
22 |
// security - hide paths
|
|
|
23 |
if (!defined('ADODB_DIR')) die();
|
|
|
24 |
|
|
|
25 |
include_once(ADODB_DIR.'/drivers/adodb-mssql.inc.php');
|
|
|
26 |
|
|
|
27 |
class ADODB_mssqlpo extends ADODB_mssql {
|
|
|
28 |
var $databaseType = "mssqlpo";
|
|
|
29 |
var $concat_operator = '||';
|
|
|
30 |
|
|
|
31 |
function PrepareSP($sql, $param = true)
|
|
|
32 |
{
|
|
|
33 |
if (is_string($sql)) $sql = str_replace('||','+',$sql);
|
|
|
34 |
$stmt = mssql_init($sql,$this->_connectionID);
|
|
|
35 |
if (!$stmt) return $sql;
|
|
|
36 |
return array($sql,$stmt);
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
function _query($sql,$inputarr=false)
|
|
|
40 |
{
|
|
|
41 |
if (is_string($sql)) $sql = str_replace('||','+',$sql);
|
|
|
42 |
return ADODB_mssql::_query($sql,$inputarr);
|
|
|
43 |
}
|
|
|
44 |
}
|
|
|
45 |
|
|
|
46 |
class ADORecordset_mssqlpo extends ADORecordset_mssql {
|
|
|
47 |
var $databaseType = "mssqlpo";
|
|
|
48 |
}
|