writing custom query in doophp

191 Views Asked by At

I am new to Doophp framework. I would like to write the following SQL query to be executed in Doophp. but I can't find any proper tutorials or reference regarding to this. Query is as follow;

SELECT * FROM m_company WHERE comp_id LIKE %$search% OR comp_kana LIKE %$search% OR comp_person LIKE %$search%

1

There are 1 best solutions below

0
On BEST ANSWER

in Doo db SmartModel you can use the "custom" paramters as here: let's assume you have a model "company" so in controller

$this->loadModel("company");
$c = new company;

$company = $c->find(array("select" => "what you want", "where" => "your statement"));

bye