mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-11-23 20:58:46 -05:00
Fixup for other MYSQL versions
This commit is contained in:
parent
5f8c7f8166
commit
f5c2b5448d
@ -104,14 +104,14 @@ class Incident
|
|||||||
$end_time = '';
|
$end_time = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = $mysqli->prepare("INSERT INTO status VALUES ('',?, ?, ?, ?, ?, ?)");
|
$stmt = $mysqli->prepare("INSERT INTO status VALUES (NULL,?, ?, ?, ?, ?, ?)");
|
||||||
$stmt->bind_param("issiii", $type, $title, $text, $time ,$end_time ,$user_id);
|
$stmt->bind_param("issiii", $type, $title, $text, $time ,$end_time ,$user_id);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$query = $stmt->get_result();
|
$query = $stmt->get_result();
|
||||||
$status_id = $mysqli->insert_id;
|
$status_id = $mysqli->insert_id;
|
||||||
|
|
||||||
foreach ($services as $service) {
|
foreach ($services as $service) {
|
||||||
$stmt = $mysqli->prepare("INSERT INTO services_status VALUES ('',?, ?)");
|
$stmt = $mysqli->prepare("INSERT INTO services_status VALUES (NULL,?, ?)");
|
||||||
$stmt->bind_param("ii", $service, $status_id);
|
$stmt->bind_param("ii", $service, $status_id);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$query = $stmt->get_result();
|
$query = $stmt->get_result();
|
||||||
|
@ -46,7 +46,7 @@ class Service
|
|||||||
{
|
{
|
||||||
global $mysqli;
|
global $mysqli;
|
||||||
$name = $_POST['service'];
|
$name = $_POST['service'];
|
||||||
$stmt = $mysqli->prepare("INSERT INTO services VALUES('',?)");
|
$stmt = $mysqli->prepare("INSERT INTO services VALUES(NULL,?)");
|
||||||
$stmt->bind_param("s", $name);
|
$stmt->bind_param("s", $name);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$query = $stmt->get_result();
|
$query = $stmt->get_result();
|
||||||
|
@ -114,7 +114,7 @@ class User
|
|||||||
$permission = $_POST['permission'];
|
$permission = $_POST['permission'];
|
||||||
|
|
||||||
|
|
||||||
$stmt = $mysqli->prepare("INSERT INTO users values ('', ?, ?, ?, ?, ?, ?, ?, 1)");
|
$stmt = $mysqli->prepare("INSERT INTO users values (NULL, ?, ?, ?, ?, ?, ?, ?, 1)");
|
||||||
$stmt->bind_param("ssssssi", $email, $username, $name, $surname, $hash, $salt, $permission);
|
$stmt->bind_param("ssssssi", $email, $username, $name, $surname, $hash, $salt, $permission);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$query = $stmt->get_result();
|
$query = $stmt->get_result();
|
||||||
|
Loading…
Reference in New Issue
Block a user