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