mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
改进sqlsrv驱动
This commit is contained in:
@@ -50,6 +50,9 @@ class Sqlsrv extends Connection
|
|||||||
public function getFields($tableName)
|
public function getFields($tableName)
|
||||||
{
|
{
|
||||||
list($tableName) = explode(' ', $tableName);
|
list($tableName) = explode(' ', $tableName);
|
||||||
|
$tableNames = explode('.', $tableName);
|
||||||
|
$tableName = isset($tableNames[1]) ? $tableNames[1] : $tableNames[0];
|
||||||
|
|
||||||
$sql = "SELECT column_name, data_type, column_default, is_nullable
|
$sql = "SELECT column_name, data_type, column_default, is_nullable
|
||||||
FROM information_schema.tables AS t
|
FROM information_schema.tables AS t
|
||||||
JOIN information_schema.columns AS c
|
JOIN information_schema.columns AS c
|
||||||
|
|||||||
Reference in New Issue
Block a user