~~~
require "config.php";
require "vendor/DB.php"
$DB = new DB(0);
//在config.php $MYSQL配置,0 = index 數組序列
$DB->table("表格") 設置表
$DB->where("1-1")設置條件
$DB->page(1,10) 分頁 第一個參數是第幾頁,第二個是數量
$DB->order("id desc") 排序
$DB->select() 查詢
$DB->find() 查詢單個
$DB->update(字典)表格字段對應數據 注意字符串 更新 無返回值
$DB->insert(字典) 表格字段對應數據 注意字符串 添加 無返回值
$DB->insert_id(字典) 表格字段對應數據 注意字符串 添加 返回新添加的ID
$DB->delete() 刪除無返回值
所有方法都可以一串處理,不用分開
如 $data = $DB->table("表格")->where("1=1")->page(1,19)->select();
~~~