The problem here is that the date string already contains the quotes - using the placeholder binding means the database driver does the quoting for you. To make your code above work, you just need to replace the $string='\'2010-04-16\''; with $string='2010-04-16';.