多年来,我一直在开发中使用以下代码段。现在突然间我得到一个数据库错误:没有这样的字段警告
$process = "process";
$create = $connection->query
(
"INSERT INTO summery (process) VALUES($process)"
);
if (DB::isError($create)) die($create->getMessage($create));
但如果我使用数字也没关系
$process = "12345";
$create = $connection->query
(
"INSERT INTO summery (process) VALUES($process)"
);
if (DB::isError($create)) die($create->getMessage($create));
或将值直接写入表达式
$create = $connection->query
(
"INSERT INTO summery (process) VALUES('process')"
);
if (DB::isError($create)) die($create->getMessage($create));
我真的很困惑......有什么建议吗?