From 2273d4117fd50ee44dcdaa28fd6444383dc403a0 Mon Sep 17 00:00:00 2001 From: alecpl Date: Tue, 26 Jan 2010 13:45:16 +0000 Subject: - Add support for MDB2's 'sqlsrv' driver (#1486395) --- program/lib/MDB2/Driver/Manager/mssql.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'program/lib/MDB2/Driver/Manager/mssql.php') diff --git a/program/lib/MDB2/Driver/Manager/mssql.php b/program/lib/MDB2/Driver/Manager/mssql.php index fc260f8e6..16e1bbe38 100644 --- a/program/lib/MDB2/Driver/Manager/mssql.php +++ b/program/lib/MDB2/Driver/Manager/mssql.php @@ -44,7 +44,7 @@ // | Lorenzo Alberton | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.109 2008/03/05 12:55:57 afz Exp $ +// $Id: mssql.php 292715 2009-12-28 14:06:34Z quipo $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -715,11 +715,11 @@ class MDB2_Driver_Manager_mssql extends MDB2_Driver_Manager_Common return $db; } - $table = $db->quoteIdentifier($table, true); + $table = $db->quote($table, 'text'); $columns = $db->queryCol("SELECT c.name FROM syscolumns c LEFT JOIN sysobjects o ON c.id = o.id - WHERE o.name = '$table'"); + WHERE o.name = $table"); if (PEAR::isError($columns)) { return $columns; } @@ -893,7 +893,7 @@ class MDB2_Driver_Manager_mssql extends MDB2_Driver_Manager_Common FROM sysobjects o WHERE xtype = 'TR' AND OBJECTPROPERTY(o.id, 'IsMSShipped') = 0"; - if (!is_null($table)) { + if (null !== $table) { $query .= " AND object_name(parent_obj) = $table"; } @@ -994,12 +994,12 @@ class MDB2_Driver_Manager_mssql extends MDB2_Driver_Manager_Common if (PEAR::isError($db)) { return $db; } - $table = $db->quoteIdentifier($table, true); + $table = $db->quote($table, 'text'); $query = "SELECT c.constraint_name FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS c WHERE c.constraint_catalog = DB_NAME() - AND c.table_name = '$table'"; + AND c.table_name = $table"; $constraints = $db->queryCol($query); if (PEAR::isError($constraints)) { return $constraints; -- cgit v1.2.3