在使用像每日一佳句…的功能時,若想依照特定條件隨機取得某一列?
簡單的使用sql語法就可以達到囉!

SELECT column FROM table where x <>”” ORDER BY RAND() LIMIT 1

-傑克老師網路創業顧問站內所有文章歡迎轉貼,但請註明出處及網址-

回覆留言

Please enter your comment!
Please enter your name here