Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by id' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 684]

$sql = "select * from pages as Page where parent_id= order by id"
$error = "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by id' at line 1"
$out = null