码迷,mamicode.com
首页 > Web开发 > 详细

thinkphp条件查询

时间:2014-11-17 15:29:37      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:style   color   ar   sp   as   line   sql   c   type   

1.这是我在做项目的时候编写的:

$profit = M(‘shipping_types‘,‘ ‘,‘DB_PROFIT‘);//没有表前缀,在M函数的第二个参数就为空。

//条件
$field = array();
$field += array(‘id‘ => ‘id‘);
$field += array(‘shipping_type‘ => ‘business_line‘);
$profit->field($field);
$business_line_lists = $profit->select();//查询
echo $profit->getLastSql();输出sql语句

thinkphp条件查询

标签:style   color   ar   sp   as   line   sql   c   type   

原文地址:http://www.cnblogs.com/kobigood/p/4103599.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!