summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
inline | side by side (from parent 1:
e464225)
Just to be sure the query is filtered as expected to only affect
shelf-based images.
->pluck('image_id')
->values()->all();
->pluck('image_id')
->values()->all();
- DB::table('images')
- ->where('type', '=', 'cover_book')
- ->whereIn('id', $shelfImageIds)
- ->update(['type' => 'cover_bookshelf']);
+ if (count($shelfImageIds) > 0) {
+ DB::table('images')
+ ->where('type', '=', 'cover_book')
+ ->whereIn('id', $shelfImageIds)
+ ->update(['type' => 'cover_bookshelf']);
+ }