Help нид запросы сделать для реги.
function __construct()
{
parent::__construct();
}
function insert_temp($login, $email, $password, $auth_key) {
$query = $this->db->query("INSERT INTO `temp_accounts` (`login`, `password`, `email`, `authkey`) VALUES(\"$login\", \"$password\", \"$email\", \"$auth_key\")");
$query = $this->db->query("INSERT INTO `customer` (`customer`) VALUES ('$login')");
return $query;
}
function check_email($email) {
$query = $this->db->query("SELECT * FROM `accounts` WHERE `email` = \"$email\"");
$query = $query->row();
return $query;
}
function check_temp_email($email) {
$query = $this->db->query("SELECT * FROM `temp_accounts` WHERE `email` = \"$email\"");
$query = $query->row();
return $query;
}
function check_login($login) {
$query = $this->db->query("SELECT * FROM `accounts` WHERE `login` = \"$login\"") or die(mysql_error());
$query = $query->row();
return $query;
}
function confirm($auth_key) {
$query = $this->db->query("SELECT * FROM `temp_accounts` WHERE `authkey` = \"$auth_key\"");
$query = $query->row();
return $query;
}
function create_account($login, $password, $email, $allowed_ip) {
$query = $this->db->query("INSERT INTO `accounts` (`login`, `password`, `email`, `AllowIPs`) VALUES(\"$login\", \"$password\", \"$email\", \"$allowed_ip\")");
return $query;
}
}
Кто может замутите плс А то в SQL не шарю