vendredi 1 mai 2015

Single quotes prevent bindValue from replacing placeholder mark

When I prepare a statement with bindValue the placeholder mark is not replaced if it is surrounded with single quotes. This is problematic since in SQL strings are surrounded by single quotes to avoid keyword conflicts. See my attachements with screenies of the content of the database once inserted with and once without single quotes. I already reported a bug, but meanwhile I am not sure anymore if this is not just an encoding problem. Is it correct to use single quotes, i.e. should this work/ is this really a bug?

With quoutes enter image description here Without quoutes enter image description here

Aucun commentaire:

Enregistrer un commentaire