cakephp插入和更新

这是我的桌子


protected $_schema = array(

    'id'        => array(

        'type'      => 'bigint',

        'length'    => 20,

        'null'      => false

    ),

    'import_id'     => array(

        'type'      => 'bigint',

        'length'    => 255,

        'null'      => false

    ),

    'betsapi_id'    => array(

        'type'      => 'string',

        'length'    => 100,

        'null'      => false

    ),

    'name'      => array(

        'type'      => 'string',

        'length'    => 255,

        'null'      => true

    ),

    'status'    => array(

        'type'      => 'int',

        'length'    => 1,

        'null'      => false

    ),

    'type'      => array(

        'type'      => 'int',

        'length'    => 1,

        'null'      => false

    ),

    'duration'      => array(

        'type'      => 'int',

        'length'    => 1,

        'null'      => false

    ),

    'date'      => array(

        'type'      => 'string',

        'length'    => null,

        'null'      => true

    ),

    'last_update'      => array(

        'type'      => 'string',

        'length'    => null,

        'null'      => true

    ),

    'result'    => array(

        'type'      => 'string',

        'length'    => 20,

        'null'      => false

    ),

    'active'    => array(

        'type'      => 'tinyint',

        'length'    => 1,

        'null'      => true

    ),

    'league_id' => array(

        'type'      => 'int',

        'length'    => 11,

        'null'      => true

    ),

    'feed_type' => array(

        'type'      => 'string',

        'length'    => 10,

        'null'      => false

    ),


);

插入之前的 vardump


array(12) {

[“import_id”]=> 字符串(7) “2545008” [“betsapi_id”]=> 字符串(8) “97525420” [“名称”]=> 字符串(22) “英超联赛 2020-21” [“状态” ]=> int(0) ["类型"]=> int(1) ["持续时间"]=> NULL ["日期"]=> 字符串(19) "2021-05-16 14:00:00" [ "last_update"]=> string(19) "2020-08-16 12:26:26" ["result"]=> string(0) "" ["active"]=> int(1) ["league_id" ]=> 字符串(1) "2" ["feed_type"]=> 字符串(8) "Betclick" }


所有提交保存成功期望betsapi_id有什么错误?


收到一只叮咚
浏览 92回答 1
1回答

慕少森

嗨,帕什马克·米尔扎/你好吗?您的发送密钥 betsapi_id 有一个值!你有什么问题 ?[“betsapi_id”]=>字符串(8)“97525420”
打开App,查看更多内容
随时随地看视频慕课网APP