开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜