Refactor software version queries to use 'rowID' instead of 'id' for consistency across the application
This commit is contained in:
@@ -64,10 +64,10 @@ if (isset($criterias['available'])) {
|
||||
|
||||
// Get all active versions
|
||||
$stmt = $pdo->prepare("
|
||||
SELECT sv.id, sv.version, sv.major_version, sv.minor_version, sv.patch_version,
|
||||
SELECT sv.rowID as id, sv.version, sv.major_version, sv.minor_version, sv.patch_version,
|
||||
sv.name, sv.description, sv.file_size, sv.release_date
|
||||
FROM software_versions sv
|
||||
WHERE sv.is_active = TRUE
|
||||
WHERE sv.status = 'published'
|
||||
ORDER BY sv.major_version DESC, sv.minor_version DESC, sv.patch_version DESC
|
||||
");
|
||||
$stmt->execute();
|
||||
|
||||
@@ -23,7 +23,7 @@ if (!$tokenData) {
|
||||
}
|
||||
|
||||
// Get file details
|
||||
$stmt = $pdo->prepare("SELECT * FROM software_versions WHERE id = ?");
|
||||
$stmt = $pdo->prepare("SELECT * FROM software_versions WHERE rowID = ?");
|
||||
$stmt->execute([$tokenData['version_id']]);
|
||||
$version = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user