I've just started to learn PHP. What I am trying to do a very simple sql select statement-
<?php
$sql = 'SELECT firstname, lastname,email
FROM MyGuests
ORDER BY firstname where id=12';
?>
It gives the following error-
Could not connect to the database testdb :SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;
Sorry if it's a foolish question.