Fixup for other MYSQL versions

This commit is contained in:
Vojtěch Sajdl 2017-11-29 15:01:16 +01:00
parent 5f8c7f8166
commit f5c2b5448d
No known key found for this signature in database
GPG Key ID: 082BC82518E5F32E
3 changed files with 4 additions and 4 deletions

View File

@ -104,14 +104,14 @@ class Incident
$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->execute();
$query = $stmt->get_result();
$status_id = $mysqli->insert_id;
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->execute();
$query = $stmt->get_result();

View File

@ -46,7 +46,7 @@ class Service
{
global $mysqli;
$name = $_POST['service'];
$stmt = $mysqli->prepare("INSERT INTO services VALUES('',?)");
$stmt = $mysqli->prepare("INSERT INTO services VALUES(NULL,?)");
$stmt->bind_param("s", $name);
$stmt->execute();
$query = $stmt->get_result();

View File

@ -114,7 +114,7 @@ class User
$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->execute();
$query = $stmt->get_result();