mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-03 21:50:43 -04:00
Use a clearer query syntax for deleting extra search and exif records (thanks Romain LE DISEZ)
This commit is contained in:
@@ -21,9 +21,9 @@ class search_task_Core {
|
||||
static function available_tasks() {
|
||||
// Delete extra search_records
|
||||
Database::instance()->query(
|
||||
"DELETE {search_records}.* FROM {search_records} " .
|
||||
"LEFT JOIN {items} ON ({search_records}.`item_id` = {items}.`id`) " .
|
||||
"WHERE {items}.`id` IS NULL");
|
||||
"DELETE FROM {search_records} " .
|
||||
"WHERE {search_records}.`item_id` NOT IN " .
|
||||
"(SELECT `id` FROM {items})");
|
||||
|
||||
// Insert missing search_records
|
||||
Database::instance()->query(
|
||||
|
||||
Reference in New Issue
Block a user