Ticket #148 PDO::Statement 语句替换

This commit is contained in:
Li Jianxuan 2011-09-08 03:45:40 +00:00
parent 1b717675dd
commit 456508b993
1 changed files with 12 additions and 5 deletions

View File

@ -736,7 +736,6 @@ class DataController extends Zend_Controller_Action
echo $form.'<script>alert("每一项内容都需要填写")</script>';
exit();
}
$datas[$k]=preg_replace("/\"/i","'",$v);
}
if(!is_numeric($datas['postcode']))
@ -751,11 +750,19 @@ class DataController extends Zend_Controller_Action
exit();
}
$sql="insert into onlineapp (userid,username,unit,phone,address,postcode,project,uuid,email)
values ('$userid','{$datas['username']}','{$datas['unit']}','{$datas['phone']}','{$datas['address']}','{$datas['postcode']}','{$datas['project']}','$uuid','{$datas['email']}')
";
$data = array(
'userid' => $userid,
'username' => $datas['username'],
'unit' => $datas['unit'],
'phone' => $datas['phone'],
'address' => $datas['address'],
'postcode' => $datas['postcode'],
'project' => $datas['project'],
'uuid' =>$uuid,
'email' =>$datas['email']
);
if($this->db->exec($sql))
if($this->db->insert('onlineapp',$data))
{
echo "您的信息已经提交成功,可以进行下载。<br />
如果页面没有自动跳转,<a href='/data/download/uuid/$uuid'>请点击这里进入下载页面</a>