sql 随机查询数据
SELECT {$field} FROM {$table} as t1 WHERE id IN ( SELECT t.id FROM (SELECT id FROM {$table} where 1=1 {$where} ORDER BY RAND() {$limit} ) AS t )
posted on 2014-08-27 11:24 chenzhaojx 阅读(368) 评论(0) 编辑 收藏 举报
SELECT {$field} FROM {$table} as t1 WHERE id IN ( SELECT t.id FROM (SELECT id FROM {$table} where 1=1 {$where} ORDER BY RAND() {$limit} ) AS t )
posted on 2014-08-27 11:24 chenzhaojx 阅读(368) 评论(0) 编辑 收藏 举报