日期:2014-05-17 浏览次数:20586 次
array (
'SU13080800340' =>
array (
0 => 'CVT121015001',
1 => 'CVT121015002',
2 => 'CVT121226001',
),
)
$sql = "SELECT stock_no, cust_no, mount FROM `stock_detail` where stock_no = 'value' ORDER BY arr_time, adress, c_type ASC";
// echo $sql;
$result = mysql_query($sql);
$str_arr = array();
while($v2 = mysql_fetch_array($result,MYSQL_ASSOC)) {
$v2[] = array_splice($res[$v2['stock_no']], 0, 1); //取出数组的前n项
var_export($v2);
}
array (
'stock_no' => 'SU13080800340',
'cust_no' => '310F61VA5A',
'mount' => '1',
0 =>
array (
0 => 'CVT121015001',
),
)array (
'stock_no' => 'SU13080800340',
'cust_no' => '310F61VA5A',
'mount' => '2',
0 =>
array (
0 => 'CVT121015002',
),
)