开发者

mysql data insert into table ..... help.....(UPDATED)

开发者 https://www.devze.com 2023-03-03 17:53 出处:网络
I have table called \'shipped_data\' http://i.stack.imgur.com/JXBej.png and need go get all \'caseNumbers\' that match with the perticular col开发者_运维百科umn and export as a \'CSV\' file. like th

I have table called 'shipped_data'

http://i.stack.imgur.com/JXBej.png

and need go get all 'caseNumbers' that match with the perticular col开发者_运维百科umn and export as a 'CSV' file. like this.

http://i54.tinypic.com/168ydmq.png

how can i do this scenario.

thanks.


Is something like this what you're looking for?

$casenumbers = array();
$query = "select caseNumber from shipped_data where [particular column]";
$result = mysql_query($query);
while($data=mysql_fetch_assoc($result)) {
    $casenumbers[]=$data['casenumber'];
}
$output = implode(',',$casenumbers);
0

精彩评论

暂无评论...
验证码 换一张
取 消