diff --git a/database/seeds/SourceSeeder.php b/database/seeds/SourceSeeder.php index 94975f6..c069509 100644 --- a/database/seeds/SourceSeeder.php +++ b/database/seeds/SourceSeeder.php @@ -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 (?, ?)");