コード例 #1
0
ファイル: UserModel.php プロジェクト: hongshuan/TestForATS
 public function addUser($user)
 {
     $username = $this->db->quote($user['username']);
     $password = $this->db->quote(Password::encode($user['password']));
     $email = $this->db->quote($user['email']);
     $telephone = $this->db->quote($user['telephone']);
     $this->db->exec("INSERT INTO users VALUES (NULL, {$username}, {$password}, {$email}, {$telephone}, NOW(), NOW())");
     return $this->db->lastInsertId();
 }