TP 查询某一条件字段 并 排序

来源:互联网 发布:java enum 默认值 编辑:程序博客网 时间:2024/05/16 09:15


例:

SELECT `content` FROM `app_sms_statistics` WHERE ( mobile= '15300330047' ) ORDER BY time DESC LIMIT 1


$sms_statistics =  M('sms_statistics');   $sms_statis = $sms_statistics->order('time DESC')->where("mobile= "."'$phone'")->getField('content');echo $sms_statistics->getlastsql();


1 0
原创粉丝点击