db fix
This commit is contained in:
parent
a367f6006c
commit
447aeded96
2
chat.php
2
chat.php
@ -15,7 +15,7 @@ require_once "config.php";
|
|||||||
$msg = filter_input(INPUT_POST, 'msg');
|
$msg = filter_input(INPUT_POST, 'msg');
|
||||||
$uid = $_SESSION['uid'];
|
$uid = $_SESSION['uid'];
|
||||||
if ($msg) {
|
if ($msg) {
|
||||||
try { db::c()->query('INSERT INTO `chat` (`uid`, `msg`) VALUES (?i, "?s")', $uid, $msg); }
|
try { db::c()->query('INSERT INTO `chat` (`user_id`, `msg`) VALUES (?i, "?s")', $uid, $msg); }
|
||||||
catch (\Krugozor\Database\Mysql\Exception $e) {
|
catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||||
echo "<div style='background-color: #ffaaaa;'>Ошибка: " . $e->getMessage() . "<br> В файле: " . $e->getFile() . " (" . $e->getLine() . ")</div>";
|
echo "<div style='background-color: #ffaaaa;'>Ошибка: " . $e->getMessage() . "<br> В файле: " . $e->getFile() . " (" . $e->getLine() . ")</div>";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user