Add sqlite support.

This commit is contained in:
kj
2022-08-04 05:30:22 -04:00
parent 08d92a2b81
commit 2411704662
3 changed files with 92 additions and 77 deletions

View File

@ -733,9 +733,13 @@ class Model {
static::$queryVars[':search'] = $search;
$where = [];
foreach($in as $row) {
$where[] = "$row LIKE CONCAT('%', :search, '%')";
}
if (DB_TYPE == 'sqlite')
foreach($in as $row)
$where[] = "$row LIKE '%' || :search || '%'";
else
foreach($in as $row)
$where[] = "$row LIKE CONCAT('%', :search, '%')";
if (static::$querySelect['where']=='')
static::$querySelect['where'] = join(' OR ', $where);