参考example_index.php
//查找主键为1(默认为id)
$temp=\db\User::find(1);
dd($temp);
//查找id>1
$temp=\db\User::select(
[
'id'=>[db_gt,1]
]);
dd($temp);
//查找id in 1,2
$temp=\db\User::select(
[
'id'=>[db_in,[1,2]]
]);
dd($temp);
部分查询条件预定义,参考lp.core.php
const db_eq ='<>db_eq.1'; //等于
const db_neq ='<>db_neq.2'; //不等于
const db_gt ='<>db_gt.3'; //大于
const db_egt ='<>db_egt.4'; //大于等于
const db_lt ='<>db_lt.5'; //小于
const db_elt ='<>db_elt.6'; //小于等于
const db_like ='<>db_like.7'; //like
const db_notlike ='<>db_notlike.8'; //not like
const db_in ='<>db_in.9'; //in
const db_notin ='<>db_notin.10'; //not in
const db_isnull ='<>db_isnull.11'; //is null
const db_isnotnull ='<>db_isnotnull.12'; //is not null
const db_findinset ='<>db_findinset.13'; //find_in_set
const db_logic ='<>db_logic.100'; //where条件逻辑控制,and,or,xor等
const db_exp ='<>db_exp.101'; //表达式,特殊情况下使用
const db_null ='<>db_null.102'; //表示null,硬性约定