1.find()是查找符合条件的第一条数据,返回的是一个一维数组;
select()是查找符合条件的所有的数据,返回的是一个二维数组;
2.以下案例
$tech=M('techlevel','HR_CS_','DB_CONFIG2');
$Data=$tech->where('id=1')->find();
dump($Data);
$Data=$tech->where('id=1')->select();
dump($Data);
输出后显示:
array(6) {
["ID"] => int(1)
["TechLevel"] => string(2) "10"
["Remark"] => string(4) "��"
["CreateDate"] => string(19) "2013-03-14 15:14:38"
["CreateBy"] => string(5) "admin"
["ROW_NUMBER"] => string(1) "1"
} array(1) {
[0] => array(6) {
["ID"] => int(1)
["TechLevel"] => string(2) "10"
["Remark"] => string(4) "��"
["CreateDate"] => string(19) "2013-03-14 15:14:38"
["CreateBy"] => string(5) "admin"
["ROW_NUMBER"] => string(1) "1"
}
}