【问题标题】:Error Number: 1048 Column 'btc' cannot be null错误号:1048 列 'btc' 不能为空
【发布时间】: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);


                }

【问题讨论】:

标签: php mysql arrays codeigniter mysqli


【解决方案1】:

检查“btc”行的数据库设置。您可能发送错误的类型

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-06-12
    • 1970-01-01
    • 2023-02-22
    • 2021-03-15
    • 2015-05-06
    • 1970-01-01
    • 2016-09-06
    相关资源
    最近更新 更多