alecpl
2010-01-26 2273d4117fd50ee44dcdaa28fd6444383dc403a0
program/lib/MDB2/Driver/Manager/mssql.php
@@ -44,7 +44,7 @@
// |          Lorenzo Alberton <l.alberton@quipo.it>                      |
// +----------------------------------------------------------------------+
//
// $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 @@
            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 @@
                    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 @@
        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;