$db=DB::table('ad');
//多条记录
$id=$db->insert([
[
'ad_merchant'=>0,
'ad_img'=>'http://pic1.quanmingwang.com/shop/ZJcop8ludg_20171013_!!99959.png',
'ad_w'=>'100',
'ad_h'=>'100',
'ad_time'=>time(),
'ad_sign'=>'hello',
'tree_id'=>'123',
],
[
'ad_merchant'=>0,
'ad_img'=>'http://pic1.quanmingwang.com/shop/ZJcop8ludg_20171013_!!99959.png',
'ad_w'=>'100',
'ad_h'=>'100',
'ad_time'=>time(),
'ad_sign'=>'hellohello',
'tree_id'=>'123',
],
]);
//单条记录
$result=$db->insertGetId([
'ad_merchant'=>0,
'ad_img'=>'http://pic1.quanmingwang.com/shop/ZJcop8ludg_20171013_!!99959.png',
'ad_w'=>'100',
'ad_h'=>'100',
'ad_time'=>time(),
'ad_sign'=>'hhahahahworld',
'tree_id'=>'123',
]);
var_dump($result);