Am I using the ORDER BY clause incorrectly
Here is a sample in sqlfiddle-

The syntax for the select statment is the following 

SELECT
    ...
    [ORDER BY {col_name | expr | position}
      [ASC | DESC], ...]
    ...


in the statement 

SELECT * FROM table_name where id='2' order by 7 and '1';


7 and '1' must be interpreted as expression by the parser: 7 is the 
integer 7 and not a row position in the select list. The manual says


  Logical AND. Evaluates to 1 if all operands are nonzero and not NULL, 


so the expresion evaluates to 1