mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-11-23 20:58:46 -05:00
Add " symbol
This commit is contained in:
parent
f6cd9202bd
commit
0fa6794cdc
@ -8,22 +8,19 @@ class SSDB
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return $conn->error;
|
return $conn->error;
|
||||||
}
|
}
|
||||||
|
|
||||||
$conn->close();
|
|
||||||
}
|
}
|
||||||
function getSetting($conn,$setting){
|
function getSetting($conn,$setting){
|
||||||
$sql = "SELECT value FROM settings WHERE setting='".$setting."';
|
$sql = "SELECT value FROM settings WHERE setting='".$setting."'";
|
||||||
$result = $conn->query($sql);
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
if ($result->num_rows > 0) {
|
if ($result->num_rows == 1) {
|
||||||
while($row = $result->fetch_assoc()) {
|
while($row = $result->fetch_assoc()) {
|
||||||
return $row["value"];
|
return $row["value"];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return "null";
|
return "null";
|
||||||
}
|
}
|
||||||
$conn->close();
|
|
||||||
}
|
}
|
||||||
function setSetting($conn,$settingname,$settingvalue){
|
function setSetting($conn,$settingname,$settingvalue){
|
||||||
$sql = "INSERT INTO settings (setting,value) VALUES ('".$settingname."','".$settingvalue."');";
|
$sql = "INSERT INTO settings (setting,value) VALUES ('".$settingname."','".$settingvalue."');";
|
||||||
@ -33,7 +30,6 @@ class SSDB
|
|||||||
return $conn->error;
|
return $conn->error;
|
||||||
}
|
}
|
||||||
|
|
||||||
$conn->close();
|
|
||||||
}
|
}
|
||||||
function deleteSetting($conn,$settingname){
|
function deleteSetting($conn,$settingname){
|
||||||
$sql = "DELETE FROM settings WHERE setting=\"".$settingname."\";";
|
$sql = "DELETE FROM settings WHERE setting=\"".$settingname."\";";
|
||||||
@ -43,6 +39,5 @@ class SSDB
|
|||||||
return $conn->error;
|
return $conn->error;
|
||||||
}
|
}
|
||||||
|
|
||||||
$conn->close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user