慕容st 发表于2017-04-28 07:25
读者您好:
请问您是否将data文件夹下的数据库文件拷贝到了MySQL中?
foreach($tmparr as $value){
$tmpnum = explode('@',$value);
$shopnum = count($tmpnum); //商品类数
$sum = 0;
foreach($tmpnum as $key => $vl){
$s_commo = explode(',',$vl);
$sql2 = "select id,name,m_price,fold,v_price from tb_commo";
$commsql = $sql2." where id = ".$s_commo[0];
// echo $commsql;
$commrst = $conn->execute($commsql);
$arr=$commrst->GetArray();
$arr[0]['num'] = $s_commo[1];
$arr[0]['total'] = $s_commo[1]*$arr[0]['v_price'];
$sum += $arr[0]['total'];
$commarr[$key] = $arr[0];
}
}