I am using cake version 1.2.0.4986alpha and am getting some bad sql
when I use Sanitize::clean. Everything runs fine without it, but when
I include it I get this:
SELECT `Post`.`COUNT(*) AS count`, `Post`.`id` FROM `posts` AS `Post`
LEFT JOIN `posts` AS `ParentPost` ON (`Post`.`parent_id` =
`ParentPost`.`id`) LEFT JOIN `categories` AS `Category` ON
(`Post`.`category_id` = `Category`.`id`) WHERE `Post`.`parent_id` IS
NULL
Notice the very first field in the select, "Post.COUNT(*) as count".
Without sanitize, the statement runs correctly, any suggestions?
Also, if it helps any, I am calling Sanitize::clean in my beforeFind
callback, like this:
function beforeFind($data) {
...
uses('sanitize');
$mrClean = & new Sanitize();
$data = $mrClean->clean($data, $this->useDbConfig);
...
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---