*Optimize the code.

This commit is contained in:
孙华伟
2022-05-11 16:15:54 +08:00
parent 0695047d20
commit ffed15713b
+2
View File
@@ -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();