Deploy on 2026-06-05 12:29:51
This commit is contained in:
@@ -39,7 +39,7 @@ class SourceSeeder
|
||||
// Insert categories
|
||||
if (!empty($source['categories'])) {
|
||||
foreach ($source['categories'] as $category) {
|
||||
$stmt = $this->pdo->prepare("SELECT id FROM source_categories WHERE source_id = ? AND category = ?");
|
||||
$stmt = $this->pdo->prepare("SELECT source_id FROM source_categories WHERE source_id = ? AND category = ?");
|
||||
$stmt->execute([$sourceId, $category]);
|
||||
if (!$stmt->fetch()) {
|
||||
$stmt = $this->pdo->prepare("INSERT INTO source_categories (source_id, category) VALUES (?, ?)");
|
||||
@@ -53,7 +53,7 @@ class SourceSeeder
|
||||
// Update existing source with new priority/categories if needed
|
||||
if (!empty($source['categories'])) {
|
||||
foreach ($source['categories'] as $category) {
|
||||
$stmt = $this->pdo->prepare("SELECT id FROM source_categories WHERE source_id = ? AND category = ?");
|
||||
$stmt = $this->pdo->prepare("SELECT source_id FROM source_categories WHERE source_id = ? AND category = ?");
|
||||
$stmt->execute([$existingId, $category]);
|
||||
if (!$stmt->fetch()) {
|
||||
$stmt = $this->pdo->prepare("INSERT INTO source_categories (source_id, category) VALUES (?, ?)");
|
||||
|
||||
Reference in New Issue
Block a user