Home >php教程 >php手册 >张进杰-ThinKPHP 3.1.3 更新指定where条件的单个数据

张进杰-ThinKPHP 3.1.3 更新指定where条件的单个数据

WBOY
WBOYOriginal
2016-06-16 08:41:141125browse

ThinKPHP 3.1.3 更新指定where()条件的单个数据。网站功能开发,仿站,联系专业工程师 QQ467477957
张进杰-ThinKPHP 3.1.3 更新指定where条件的单个数据public function confirm(){<br>    $Dao=M('ota_in');<br>    $id=$_GET['id'];<br>   // echo $id;<br>     <br> // 需要更新的数据<br>     $data['confirm'] = '已消费';<br>     <br> // 更新的条件<br>     //$condition['id'] = '$id';<br>  <br> $result = $Dao->where("id='$id'")->save($data);<br>   <br> <br>     if($result !== false){<br>         //echo '数据更新成功!';<br> $this->success('成功核销一条ota订单'); <br>     }else{<br>         //echo '数据更新失败!'; <br> $this->error('核销失败');<br>     }<br>    }

AD:真正免费,域名+虚机+企业邮箱=0元

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn