從mysql數據表中隨機取出一條記錄?
order by rand() 就是隨機排序order by rand() limit 1 就是隨機獲取一行數據.滿足2個條件,第一是 `Sex`='男' 和`Ctiy`='廣州'select * from `user` where`Sex`='男' AND `Ctiy`='廣州' order by rand() limit 1
order by rand() 就是隨機排序order by rand() limit 1 就是隨機獲取一行數據.滿足2個條件,第一是 `Sex`='男' 和`Ctiy`='廣州'select * from `user` where`Sex`='男' AND `Ctiy`='廣州' order by rand() limit 1