How to modify the code to achieve the following results
This post was last edited by lazygc520 on 2013-08-12 12:00:23
$sql 2 = "Select Stock_no, Cust_no, Mount from ' stock_detail ' where stock_no = '". $stockno [$j-1]. "' ORDER by Arr_time, adress, C_type ASC ";
$result 2 = mysql_query ($sql 2);
while ($v 2 = mysql_fetch_array ($result 2,mysql_assoc)) {
$val _1 = Implode (",", $v 2[' 0 ']);
echo $val _1. '
';
}
The results are as follows:
VP3.0 130219001,vp3.0 130219002,vp3.0 130219003,vp3.0 130219004,vp3.0 130219005,vp3.0 130219006,VP3.0 130219007,VP3.0 130219008,vp3.0 130219009,vp3.0 130219010,vp3.0 130219011,vp3.0 130219012,vp3.0 130219013
VP3.0 130219014,vp3.0 130219015,vp3.0 130219016,vp3.0 130219017,vp3.0 130219018,vp3.0 130219019,VP3.0 130219020,VP3.0 130219021,vp3.0 130219022,vp3.0 130219023,vp3.0 130219024,vp3.0 130219107,vp3.0 130219108
How to become:
' VP3.0 130219001 ', ' VP3.0 130219002 ', ' VP3.0 130219003 ', ' VP3.0 130219004 ', ' VP3.0 130219005 ', ' VP3.0 130219006 ', ' VP3.0 130219007 ', ' VP3.0 130219008 ', ' VP3.0 130219009 ', ' VP3.0 130219010 ', ' VP3.0 130219011 ', ' VP3.0 130219012 ', ' VP3.0 130219013 '
' VP3.0 130219014 ', ' VP3.0 130219015 ', ' VP3.0 130219016 ', ' VP3.0 130219017 ', ' VP3.0 130219018 ', ' VP3.0 130219019 ', ' VP3.0 130219020 ', ' VP3.0 130219021 ', ' VP3.0 130219022 ', ' VP3.0 130219023 ', ' VP3.0 130219024 ', ' VP3.0 130219107 ', ' VP3.0 130219108 '
Share to:
------Solution--------------------