thinkphp-查询某一列的值column
说明
column方法查询结果不存在,返回空数组
示例
$nameValue=Db::table('think_user')->where('status',1)->column('name');print_r($nameValue);
输出
Array([0]=>thinkphp)
示例2
指定索引
$nameValue=Db::table('think_user')->where('status',1)->column('name','id');print_r($nameValue);
Array([1]=>thinkphp)
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。