mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
改进断线重连判断
This commit is contained in:
@@ -44,14 +44,11 @@ class Pgsql extends Connection
|
||||
*/
|
||||
public function getFields($tableName)
|
||||
{
|
||||
$this->initConnect(false);
|
||||
|
||||
list($tableName) = explode(' ', $tableName);
|
||||
$sql = 'select fields_name as "field",fields_type as "type",fields_not_null as "null",fields_key_name as "key",fields_default as "default",fields_default as "extra" from table_msg(\'' . $tableName . '\');';
|
||||
// 调试开始
|
||||
$this->debug(true);
|
||||
$pdo = $this->linkID->query($sql);
|
||||
// 调试结束
|
||||
$this->debug(false, $sql);
|
||||
|
||||
$pdo = $this->query($sql, [], false, true);
|
||||
$result = $pdo->fetchAll(PDO::FETCH_ASSOC);
|
||||
$info = [];
|
||||
if ($result) {
|
||||
@@ -78,13 +75,8 @@ class Pgsql extends Connection
|
||||
*/
|
||||
public function getTables($dbName = '')
|
||||
{
|
||||
$this->initConnect(false);
|
||||
$sql = "select tablename as Tables_in_test from pg_tables where schemaname ='public'";
|
||||
// 调试开始
|
||||
$this->debug(true);
|
||||
$pdo = $this->linkID->query($sql);
|
||||
// 调试结束
|
||||
$this->debug(false, $sql);
|
||||
$sql = "select tablename as Tables_in_test from pg_tables where schemaname ='public'";
|
||||
$pdo = $this->query($sql, [], false, true);
|
||||
$result = $pdo->fetchAll(PDO::FETCH_ASSOC);
|
||||
$info = [];
|
||||
foreach ($result as $key => $val) {
|
||||
|
||||
Reference in New Issue
Block a user