代码示例
基本用法
// 获取产品总数
$count = read('product');
// 获取新闻总数
$count = read('news');
// 获取订单总数
$count = read('order');
带条件查询
// 获取未删除的产品数
$count = read('product', ['delstatus' => 0]);
// 获取已审核的新闻数
$count = read('news', ['checked' => 1]);
支持的表名
product, news, photo, video, experience, master,
kungfu, factory, page, order, message, guestbook,
subscribe, emailsubscription, apply, comment, submission,
applicant, ad, tag, link, linkapply, saler,
salerwithdrawalrecord, order_return, blacklist, openid,
member, counter, wemall, member_address, posttype,
salergrade, config, category, nav, payin
数据统计
| 表名 | 记录数 |
|---|---|
1 | 6 |
2 | 15 |
3 | 5 |
4 | 5 |
5 | 5 |
6 | 4 |
7 | 4 |
8 | 5 |