$sql = "select CONCAT(SUBSTRING_INDEX(a.cust_no,' ',1), SUBSTRING_INDEX(a.cust_no,' ',-1)) as cust_no,b.lotno as lotno, count(b.lotno) as lotno_count from `kw_manage` as a, `vp_barcode_2d_y` as b where a.packageno = b.packageno group by lotno order by lotno asc"; $result = mysql_query($sql); $ars =array(); while($row = mysql_fetch_array($result,MYSQL_ASSOC)) { $ars[] = $row; } var_dump($ars);
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论