Call to a member function setFetchMode() on a non-object

Are you getting any other information about the error (perhaps in your PHP error log)?

Hi fretburner. Sorry for the late reaction. Just tested the page again and this is the last entry in the error log:

[30-Jun-2014 22:32:08 Europe/Paris] PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 Erreur de syntaxe près de 'AS age >= '30'' à la ligne 11' in C:\\wamp\\www\\mySite\\resultaten.php:58
Stack trace:
#0 C:\\wamp\\www\\mySite\\resultaten.php(58): PDOStatement->execute()
#1 {main}
  thrown in C:\\wamp\\www\\mySite\\resultaten.php on line 58

French is not my best language but as I see it is there a problem with the repeated calculation i.e. 'AS age >= ‘30’

How about if you remove the “AS age” from the WHERE line.

        $sql .= " AND TIMESTAMPDIFF(YEAR,dob,CURDATE()) >= :leeftijd_van";

Hi Drummin. Thanx for the reply. Im gonna give that a try

So simple but so incredibly brilliant as well. Thanks a lot Drummin my day can’t go wrong. :tup:

Credit goes to fretburner as he got you further than I could have with this. Wish you smooth sailing moving forward.