I am using Laravel 5 and am trying to insert an email with a +
sign into a string field in the database.
Unfortunately the +
is getting decoded to a space in the database. I traced the code and identified it to be pdo that is changing the value to a space.
The code looks like:
$bindings = $me->prepareBindings($bindings);
return $me->getPdo()->prepare($query)->execute($bindings);
If I print the $bindings
array between the two statements the email is: email => email+test@email.com
. However when I check the db it says: email test@email.com
.
My broad question is how can I avoid this with Laravel? Or more specifically how can I avoid it using pdo?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1PN6bDn
via IFTTT
Aucun commentaire:
Enregistrer un commentaire