PHP PDO fetchObject not returning any results?

If you are preparing and/or binding parameters, check and make sure that you didn’t put quotes around your parameters. Had a frustrating “bug” turn out to be that the PDO prepare method automatically adds quotes around the parameters. ┬áSo I was effectively building a query like this ” “1” ” instead of “1”.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>