|
PHP复制代码 function update ($id, $title, $author, $date, $article){
$data = array('title' => $title, 'author' => $author, 'date' => $date, 'article' => $article);
echo $id;
if(isset($id)){
// $this->db->where('id', $id);
$thid->db->update('t_news', $data, "id=$id");
}
else{
echo 'not set';
}
} 复制代码
A PHP Error was encounteredSeverity: Notice
Message: Undefined variable: thid
Filename: dao/news_dao.php
Line Number: 39
A PHP Error was encounteredSeverity: Notice
Message: Trying to get property of non-object
Filename: dao/news_dao.php
Line Number: 39
哪来 的thid? 数据库里对应的也是 id. |
|