引継ぎコード追加

This commit is contained in:
2023-07-13 12:37:36 +09:00
parent 4130e71756
commit c451fff119
3 changed files with 15 additions and 2 deletions
+12 -2
View File
@@ -6,6 +6,7 @@ User
var $id;
var $name;
var $pass;
var $inheritance_code;
public static function
find (
@@ -28,6 +29,7 @@ User
$self -> id = $id;
$self -> name = $row['name'];
$self -> pass = $row['pass'];
$self -> inheritance_code = $row['inheritance_code'];
return $self;
}
@@ -38,8 +40,16 @@ User
{
$sql = "
INSERT INTO
users (name, pass)
VALUES ('{$this -> name}', '{$this -> pass}')";
users (
name,
pass,
inheritance_code,
created_at)
VALUES
('{$this -> name}',
'{$this -> pass}',
'{$this -> inheritance_code}',
NOW())";
$GLOBALS['__db_connection'] -> query ($sql)
or die ("db_insert error $sql");