SHARE
TWEET

Kohana 2.3.4 ORM and Regex database method

a guest Feb 22nd, 2012 16 Never
  1. $prod_name = ORM::factory("product")->regex("prod_name", "^" . $searchArray[$i] . "$")->find_all();
  2.  
  3. $prod_name = ORM::factory("product")->regex("prod_name", "/b" . $searchArray[$i] . "/b")->find_all();
  4.  
  5. $prod_name = ORM::factory("product")->regex("prod_name", "/b" . $searchArray[$i] . "b/")->find_all();
  6.        
  7. $prod_name = ORM::factory("product")->like("prod_name",$searchArray[$i])->find_all();
  8.        
  9. $prod_name = ORM::factory("product")->like("prod_name",$searchArray[$i] . "%", FALSE)->find_all();
  10.        
  11. [[:<:]]shoe
  12.        
  13. shoe[[:>:]]
  14.        
  15. [[:<:]]shoe[[:>:]]
  16.        
  17. $prod_name = ORM::factory("product")->regex("prod_name", "[[:<:]]" . $searchArray[$i])->find_all();
RAW Paste Data
Top