I have some complex queries in my plugin which require me to use the ->query() and not the ->find() methods.
I couldn't understand how to sanitize the raw sql so I guessed someone here can guide me.
So the first step is to include the App:import("sanitize"); before the declaration of the class.
Now let's say I have this :
$query = $this->Mytable->query("SELECT * FROM mytable WHERE " . $WHERECLAUSE . ";");
Can some one help me out in sanitizing my query as i got completely lost in the cookbook.
Thanks for your help, it is very much appreciated.