![]() |
Apostrophes in form fields causing database errors - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Apostrophes in form fields causing database errors (/showthread.php?tid=23002) |
Apostrophes in form fields causing database errors - El Forum - 09-26-2009 [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 Apostrophes in form fields causing database errors - El Forum - 09-26-2009 [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. Apostrophes in form fields causing database errors - El Forum - 09-28-2009 [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? |