<code>

$filter['searchno'] = '0258007090'; // This is a string

$criteria[] = array('Product.searchno' => "LIKE " .
str_replace(array('?','*'),array('_','%'), $filter['searchno'])); //
Product.searchno -- it's a VARCHAR field

$data = $this->Product->findAll($criteria, null, $order, $limit,
$page);

</code>

This code produces this query: SELECT COUNT(*) AS count FROM
`imex_products` AS `Product` WHERE `Product`.`searchno` LIKE
0258007090

Search query isn't escaped :(


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to