Good afternoon, Is there any method in a sql query to sort from a value and if that value does it return it first and then all rest of the values?
Example: A table with days from 1 to 7, where I would put in case there was a return value of 5 first and then all others ("123467")
It would be almost a where but I could pull the other values also after that selected value.
$dia = 5;
$query = $this->db->query("SELECT * FROM tabela where dia = $dia");
//Teria que retornar query com o primeiro valor = 5 e depois todos outros valores.