[PHP] random order by id

2002-05-18 Thread Jule
Hey guys, i have a db and a table with id and questions now i want these questions to be listed in a random order, is there a way to format my SQL query or do i need some PHP work to? i can ofcourse select a random one, that's no problem, but how do i make sure that that one does not get chosen

Re: [PHP] random order by id

2002-05-18 Thread Richard Baskett
] random order by id Hey guys, i have a db and a table with id and questions now i want these questions to be listed in a random order, is there a way to format my SQL query or do i need some PHP work to? i can ofcourse select a random one, that's no problem, but how do i make sure that that one

RE: [PHP] random order by id

2002-05-18 Thread David Freeman
i have a db and a table with id and questions now i want these questions to be listed in a random order, is there a way to format my SQL query or do i need some PHP work to? It's best achieved in sql: SELECT ID, Question FROM Questions WHERE Some = Condition ORDER BY RAND() LIMIT 10