【发布时间】:2019-03-08 21:32:39
【问题描述】:
这段代码显示
错误号:1048
“btc”列不能为空
但实际上我发送的一切都是正确的,我什至尝试了带有 URL 的参数,但它仍然说 btc 不能为空。怎么了
$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);
}
【问题讨论】:
-
我什至试过localhost/riseup/ajax/withdraw_btc?btc=123,但它仍然显示btc不能为空
-
print_r($data)这是什么?
标签: php mysql arrays codeigniter mysqli