Skip to content
Snippets Groups Projects
Commit f92fa698 authored by Bartek Przybylski's avatar Bartek Przybylski
Browse files

another query fix

parent af6eb52b
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ class OC_GALLERY_SCANNER {
$stmt = OC_DB::prepare('SELECT * FROM *PREFIX*gallery_photos WHERE `album_id` = ? AND `file_path` = ?');
$result = $stmt->execute(array($albumId, $img));
if ($result->numRows() == 0) {
$stmt = OC_DB::prepare('INSERT OR REPLACE INTO *PREFIX*gallery_photos (`album_id`, `file_path`) VALUES (?, ?)');
$stmt = OC_DB::prepare('REPLACE INTO *PREFIX*gallery_photos (`album_id`, `file_path`) VALUES (?, ?)');
$stmt->execute(array($albumId, $img));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment