|
123456789101112131415161718192021222324252627 |
- <?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");
- }
- }
-
|