* [refac] calling the descTable method to get the information of table fields.

This commit is contained in:
liugang
2025-05-19 09:26:26 +08:00
committed by 刘刚
parent b91f123398
commit 535f66d8e2
+2 -13
View File
@@ -1771,19 +1771,8 @@ class baseDAO
*/
public function getFieldsType()
{
try
{
$this->dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
$sql = "DESC $this->table";
$rawFields = $this->dbh->rawQuery($sql)->fetchAll();
$this->dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL);
}
catch (PDOException $e)
{
$this->sqlError($e);
}
$fields = array();
$fields = array();
$rawFields = $this->descTable($this->table);
foreach($rawFields as $rawField)
{
$firstPOS = strpos($rawField->type, '(');