Hello, I'm have 2 tables as follow my users table and my online_users table. I want to show on my pages my online users first and under this the offline users. So i work with a LEFT JOIN to select my online users first but i don't know how i can first show my online users random. If i do order by rand() then it doesn't show the online first but the whole members table random. I work also via a navigation with 100 users per page. Does someone knows a working solution?
Do your first query, appy the RAND() function to it so your records are random. Then do a Union to the next query.