*Optimize the code.
This commit is contained in:
@@ -637,6 +637,8 @@ class projectModel extends model
|
||||
* */
|
||||
public function getBySearch($projectQuery)
|
||||
{
|
||||
$flag = stripos($projectQuery, 'and') + 3;
|
||||
$projectQuery = substr_replace($projectQuery, " (`type` = 'project') and", $flag, 0);
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
|
||||
->where($projectQuery)
|
||||
->fetchAll();
|
||||
|
||||
Reference in New Issue
Block a user