• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Active Record Not Escaping

#1
[eluser]hpadrick[/eluser]
I am using $this->db->insert('table', $data)... When the data is inserted it is not escaped, but when profiler is enabled it is showing the query at the bottom with escapes.

CI version 1.6.3

PHP version 5.2.5

#2
[eluser]hpadrick[/eluser]
More Info:

The form info originally typed:

`Should'" Es\cape

Bad"quote" 'single'

DAta

attached is the profiler screenshot with the escapes

#3
[eluser]hpadrick[/eluser]
attached is screenshot of mysql with no escapes

#4
[eluser]Pascal Kriete[/eluser]
I believe this is caused by the mysql cli client. It interprets the escapes when it displays the data. Try running it with the --raw or -r flag.

#5
[eluser]hpadrick[/eluser]
I get the same output in phpmyadmin... but I will try with the flags... I ran my own quotes and they are inserted and shown with no problems.

#6
[eluser]hpadrick[/eluser]
no different... add_slashes() inserts the slashes fine... but the db->insert method is not

#7
[eluser]hpadrick[/eluser]
I have installed everything on a work PC and run some tests. Still no escapes.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.