我正在使用谷歌云sql实例为我的应用程序数据库,当我尝试将记录插入其中时不会产生任何错误但是没有插入记录但是当我使用我的本地数据库时一切正常可能是什么原因造成的这个..
我的项目是一个codeigniter应用程序。同时,如果我尝试从云实例(选择)中读取它的工作原理。代码没有问题,因为它对我的localhost工作正常。
$data['username'] = $this->input->post('username');
$data['email'] = $this->input->post('email');
$data['metamask_address'] = $this->input->post('metamask_address');
$data['address1'] = $this->input->post('address1');
$data['address2'] = $this->input->post('address2');
$data['phone'] = $this->input->post('phone');
$data['surname'] = $this->input->post('surname');
$data['zip'] = $this->input->post('zip');
$data['city'] = $this->input->post('city');
$data['state'] = $this->input->post('state');
$data['country'] = $this->input->post('country');
$data['langlat'] = '';
$data['wishlist'] = '[]';
$data['creation_date'] = time();
if ($this->input->post('password1') == $this->input->post('password2'))
{
$password = $this->input->post('password1');
$data['password'] = sha1($password);
$this->db->insert('user', $data);
$msg = 'done';
if($this->email_model->account_opening('user', $data['email'], $password) == false)
{
$msg = 'done_but_not_sent';
}
else
{
$msg = 'done_and_sent';
}
}
echo $msg;