Added where statements to is main project queries

Signed-off-by: rodude123 <rodude123@gmail.com>
This commit is contained in:
Rohit Pai 2023-06-26 18:11:43 +01:00
parent 7d0317ed60
commit e4877453cc
2 changed files with 4 additions and 4 deletions

View File

@ -64,7 +64,7 @@ class projectData
if ($isMainProject === "true")
{
$stmtMainProject = $conn->prepare("UPDATE projects SET isMainProject = 0;");
$stmtMainProject = $conn->prepare("UPDATE projects SET isMainProject = 0 WHERE isMainProject = 1;");
$stmtMainProject->execute();
}
@ -129,7 +129,7 @@ class projectData
$conn = dbConn();
if ($isMainProject === "true")
{
$stmtMainProject = $conn->prepare("UPDATE projects SET isMainProject = 0;");
$stmtMainProject = $conn->prepare("UPDATE projects SET isMainProject = 0 WHERE isMainProject = 1;");
$stmtMainProject->execute();
}

View File

@ -64,7 +64,7 @@ class projectData
if ($isMainProject === "true")
{
$stmtMainProject = $conn->prepare("UPDATE projects SET isMainProject = 0;");
$stmtMainProject = $conn->prepare("UPDATE projects SET isMainProject = 0 WHERE isMainProject = 1;");
$stmtMainProject->execute();
}
@ -129,7 +129,7 @@ class projectData
$conn = dbConn();
if ($isMainProject === "true")
{
$stmtMainProject = $conn->prepare("UPDATE projects SET isMainProject = 0;");
$stmtMainProject = $conn->prepare("UPDATE projects SET isMainProject = 0 WHERE isMainProject = 1;");
$stmtMainProject->execute();
}