phpclass sql public $host; public $port; public $user; public $pass; public $db; public $charset; 数据库初始化 public function __constructarray $config = array $this-host
The code cannot write the echo $db->check("INSERT INTO 'user' ('user') values ('123')") because there is a syntax error in the SQL query.
In the query, the table name and column name are enclosed in single quotes (''), which is incorrect. The correct syntax should be backticks (`) or no quotes at all.
The correct query should be:
echo $db->check("INSERT INTO user (user) values ('123')");
原文地址: https://www.cveoy.top/t/topic/iBzs 著作权归作者所有。请勿转载和采集!