新手 求解。。。
thinkphp吧
全部回复
仅看楼主
level 1
Yang7790536 楼主
function add(){
if($_POST){
$Dao=M("Sick");
$data=array();
$data['name']=$_POST['name'];
$data['age']=$_POST['age'];
$data['sex']=$_POST['sex'];
$data['phone']=$_POST['phone'];
if($Dao->add($data)){
$this->error("添加成功");
}else {
echo $Dao->getLastSql();
}
}else{
$this->display();
}
}
总是输出这样的 INSERT INTO `yz_sick` () VALUES () why?
2013年04月16日 08点04分 1
level 11
[哈哈]
2013年04月16日 16点04分 2
level 7
@Yang7790536,@信sue
改成$Dao->data($data)->add() 试试
2013年04月19日 02点04分 3
1