Jump to content
Fórum Script Brasil
  • 0

Ordenar resultado com PHP


Question

Olá,

alguém sabe que modificação devo fazer à seguinte query, deforma a que os registos com o room_id 1 e 2 da tabela boom_rooms fiquem sempre no topo?

Obrigado.

$rooms = $mysqli->query(" SELECT *,     ( SELECT Count(boom_users.user_id) FROM boom_users  Where boom_users.user_roomid = boom_rooms.room_id AND last_action > '$check_action' AND user_status != 6 ) as room_count    FROM  boom_rooms WHERE ORDER BY room_count DESC, room_id ASC");

 

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      148687
    • Total Posts
      644519
×
×
  • Create New...