Merge pull request #164 from ArabCoders/dev

using LIKE for metadata/extra search in db:list
This commit is contained in:
Abdulmohsen
2022-06-16 22:15:34 +03:00
committed by GitHub

View File

@@ -205,7 +205,7 @@ final class ListCommand extends Command
);
}
$where[] = "json_extract(" . iFace::COLUMN_META_DATA . ",'$.{$sField}') = :jf_metadata_value";
$where[] = "json_extract(" . iFace::COLUMN_META_DATA . ",'$.{$sField}') LIKE \"%\" || :jf_metadata_value || \"%\"";
$params['jf_metadata_value'] = $sValue;
}
@@ -218,7 +218,7 @@ final class ListCommand extends Command
);
}
$where[] = "json_extract(" . iFace::COLUMN_EXTRA . ",'$.{$sField}') = :jf_extra_value";
$where[] = "json_extract(" . iFace::COLUMN_EXTRA . ",'$.{$sField}') LIKE \"%\" || :jf_extra_value || \"%\"";
$params['jf_extra_value'] = $sValue;
}