Welcome Guest, Not a member yet? Register   Sign In
Apostrophes in form fields causing database errors
#1

[eluser]richzilla[/eluser]
Hi all, im having a bit of trouble entering text into a database. If any apostrophes are entered into the field it upsets the database entry, because it thinks that is the end of a database field, presumably. However, what i can gather from the CI user guide is that database entries using active record are automatically escaped, so apostrophes shouldnt cause any problems? if ive mis understood, or if theres a function i can use to escape apostrophes id greatly appreciate it.

cheers
#2

[eluser]bretticus[/eluser]
You might want to show your code. Also, it seems that most of the AR methods have a parameter for telling CI not to try and protect anything when you need to submit something literal.
#3

[eluser]khancute[/eluser]
[quote author="bretticus" date="1254004462"]You might want to show your code. Also, it seems that most of the AR methods have a parameter for telling CI not to try and protect anything when you need to submit something literal.[/quote]

yeah, i think you're talking about the backthick right?




Theme © iAndrew 2016 - Forum software by © MyBB