数据更新或插入

v2.8.2可用

Model::getInstance()->db()->upSet('test', 
        ['id' => 1, 'test' => 'bbb'], ['test' => 'ccc']
    );
//生成的语句为 INSERT INTO pr_test SET `id`= '1',`test`= 'bbb' ON DUPLICATE KEY UPDATE `id`= '1',`test`= 'ccc'

results matching ""

    No results matching ""