Files
goatoh_training_server/modules/chat.mod.php
T
2023-07-18 12:32:17 +09:00

27 lines
395 B
PHP

<?php
class
Chat
{
public int $id;
public int $user_id;
public string $pass;
function
insert ():
int
{
$sql = "
INSERT INTO
chats (
user_id,
text)
VALUES
({$this -> user_id},
'{$this -> text}')";
$GLOBALS['__db_connection'] -> query ($sql)
or die ("db_insert error $sql");
}
}