mysql 随机排序

$sql = ‘SELECT a.ad_id, a.position_id, a.media_type, a.ad_link, a.ad_code, a.ad_name, p.ad_width, ‘ . ‘p.ad_height, p.position_style, RAND() AS rnd ‘ . ‘FROM ‘ . $GLOBALS[‘ecs’]->table(‘ecsmart_ad’) . ‘ AS a ‘. ‘LEFT JOIN ‘ . $GLOBALS[‘ecs’]->table(‘ecsmart_ad_position’) . ‘ AS p ON a.position_id = p.position_id ‘ . “WHERE enabled = 1 AND start_time <= ‘” . $time . “‘ AND end_time >= ‘” . $time . “‘ “. “AND a.position_id = ‘” . $arr[‘id’] . “‘ ” . ‘ORDER BY rnd LIMIT ‘ . $arr[‘num’]; $res = $GLOBALS[‘db’]->GetAll($sql); ecshop 函数库的随机排序方式
前端

Linux 删除乱码文件夹

2018-3-15 18:43:13

随笔前端

前端canvas生成满屏水印

2018-7-25 10:42:01

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
今日签到
有新私信 私信列表
搜索