Alex Rivera | Logout

How do you escape SQL data in CakePHP?

Asked 2010-08-20T19:33:38.150
10

For some reason the AppModel->updateAll() method does not escape data passed to it. Looking over the documentation though, I can't find anything on how you actually escape data with CakePHP.

Down in datasources/dbo/dbo_mysql.php I found the value() method that seems to just use mysql_real_escape_string() - but how do you access that method from up in the models?

Edit
Report

1 Answer

-1

Here's an alternative way of doing things, using Sanitize::paranoid:

http://www.ibm.com/developerworks/opensource/library/os-php-cake3/

answered 2011-09-19T01:51:41.507

Your Answer