上一篇《更新方法:Update API-Medoo使用指南》中介绍了如何使用Medoo的Update方法来来修改数据库已有的数据,本篇将告诉你如何使用Delete方法来删除数据库中的数据。php
删除方法:Deletehtml
删除数据库中的数据。数据库
delete($table, $where) //table [string]: 表名 //where [array]:WHERE子句筛选记录
返回值: [number] 受到影响的行数post
提示:delete是最危险的方法,使用它以前请三思。spa
$database = new medoo("my_database"); $database->delete("account", [ "AND" => [ "type" => "business" "age[<]" => 18 ] ]);
Medoo版本: 0.9.1.1 .net
原文标题: 删除方法:Delete API-Medoo使用指南 code
原文连接: http://loiynet.dev.com/post/585.htmlhtm