5 months ago

How to arrange mysql query result according to where conditions ?

Posted 5 months ago by EbrahemSamer

I am running query like

$query = "SELECT * FROM students WHERE name = ahmed or age > 20";

the result will be any person has name ahmed or greater than 20 years

I want the name result get first ( all students have this name 'ahmed' ) not the age .

How can i do this ?

Please sign in or create an account to participate in this conversation.