此代码显示
错误号:1048
'btc'列不能为空
但是实际上我发送的一切正确,我什至尝试了URL参数,但仍然说btc不能为null。怎么了
$date='';
$timezone = "Asia/Karachi";
if(function_exists('date_default_timezone_set'))
date_default_timezone_set($timezone);
$date=date('d-m-Y | H:i:s');
$data=array(
'username' => $this->session->userdata('username'),
'btc' => $this->input->post('btc'),
'networkfee' => $this->input->post('networkfee'),
'address' => $this->input->post('address'),
'riseupfee' => $this->input->post('riseupfee'),
'date' => $date,
'status' => 'Sent'
);
$this->load->model('ajax_model');
$data = $this->ajax_model->withdraw_btc($data);
发送ajax请求。
$.ajax({
type:'POST',
data:{btc: '0.0001', address: 'xxxx', risupfee: '0.001',
networkfee: '0.0001'},
url:'<?php echo site_url('ajax/withdraw_btc'); ?>',
success: function(result){
alert(result);
}
答案 0 :(得分:0)
检查数据库设置中的“ btc”行。您可能输入了错误的类型