Added where statements to is main project queries
Signed-off-by: rodude123 <rodude123@gmail.com>
This commit is contained in:
parent
7d0317ed60
commit
e4877453cc
4
dist/api/project/projectData.php
vendored
4
dist/api/project/projectData.php
vendored
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user