(There is an error in the 2nd line, the line is not completed. Add "); at the end, and everything will be fine. This is on the page with which you are connected, so this is their fault. Of course, you must specify the values that will replace the question marks and then actually run the query before you get any results.)
In any case, to the point. PDO looking for markers ? or :name and replaces them (in order or by name, respectively) with the values you specify. When values are inserted into the query string, they are first processed to avoid anything that can be used for injection attacks.
This is similar to using the mysql_real_escape_string() (or weaker addslashes() ) value before using it in the query, but PDO does this automatically and better on it.
source share