Retrieving data from db...fields have quotes around them. |
[eluser]CroNiX[/eluser]
For some reason, when I insert escaped data into the database and then later retrieve it, the data that was escaped has single quotes around it. Is this normal or am I doing something wrong? Here is some stripped down code (not showing all fields as its irrelevant). Controller: Code: function add() The model: Code: function add($data) An example of fname that gets stored in the database: 'bill' with the single quotes around it. So what am I doing wrong with this? Thanks.
[eluser]Armchair Samurai[/eluser]
You're escaping things twice: once in your controller with $this->db->escape() and then again in the model with $this->db->insert().
[eluser]pistolPete[/eluser]
User Guide - Inserting Data Quote:Note: All values are escaped automatically producing safer queries.
|
Welcome Guest, Not a member yet? Register Sign In |