1.案例代码:
$sql1="insert into content(category,subject,content,username,release_date) values('{$category}','{ $subject}','{$content}','{$user}','{$date}')";
//向数据表中插入数据的操作
$res1=dml($sql1);
2.错误原因:
(1)检查数据表的各个字段拼写是否正确;
(2)检查插入的变量的值,使用语句var_dump($xxx),查看此变量值格式、数值是否正确;
(3)检查数据表的NULL字
- 1
- 2
前往页