テスト用
This commit is contained in:
+2
-2
@@ -16,7 +16,7 @@ $user -> inheritance_code = implode (array_map (fn () => rand (0, 9), range (1,
|
|||||||
|
|
||||||
$user -> insert ();
|
$user -> insert ();
|
||||||
|
|
||||||
echo [$user -> id,
|
echo implode (',', [$user -> id,
|
||||||
$user -> pass,
|
$user -> pass,
|
||||||
$user -> inheritance_code];
|
$user -> inheritance_code]);
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
class
|
class
|
||||||
Chat
|
Chat
|
||||||
{
|
{
|
||||||
var $id;
|
public int $id;
|
||||||
var $user_id;
|
public int $user_id;
|
||||||
var $pass;
|
public string $pass;
|
||||||
|
|
||||||
function
|
function
|
||||||
insert ():
|
insert ():
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
class
|
class
|
||||||
User
|
User
|
||||||
{
|
{
|
||||||
var $id;
|
public int $id;
|
||||||
var $name;
|
public string $name;
|
||||||
var $pass;
|
public string $pass;
|
||||||
var $inheritance_code;
|
public string $inheritance_code;
|
||||||
|
|
||||||
public static function
|
public static function
|
||||||
find (
|
find (
|
||||||
@@ -44,11 +44,13 @@ User
|
|||||||
name,
|
name,
|
||||||
pass,
|
pass,
|
||||||
inheritance_code,
|
inheritance_code,
|
||||||
created_at)
|
created_at,
|
||||||
|
modified_at)
|
||||||
VALUES
|
VALUES
|
||||||
('{$this -> name}',
|
('{$this -> name}',
|
||||||
'{$this -> pass}',
|
'{$this -> pass}',
|
||||||
'{$this -> inheritance_code}',
|
'{$this -> inheritance_code}',
|
||||||
|
NOW(),
|
||||||
NOW())";
|
NOW())";
|
||||||
$GLOBALS['__db_connection'] -> query ($sql)
|
$GLOBALS['__db_connection'] -> query ($sql)
|
||||||
or die ("db_insert error $sql");
|
or die ("db_insert error $sql");
|
||||||
|
|||||||
Reference in New Issue
Block a user