my work my work - 15 days ago 7
PHP Question

How to write a query that selects 9 rows randomly from database?

SELECT * FROM tbl_specialisation
WHERE LENGTH(spec_specialise) < 20 ORDER BY spec_specialise LIMIT 9


add to this query

Answer

"SELECT * FROM tbl_specialisationWHERE LENGTH(spec_specialise) < 20 ORDER BY RAND() LIMIT 9 ";