my code is connection.query('call addtion("'+tr+'","'+lat+'","'+long+'","'+sp+'","'+dat+'","'+start+'","'+stop+'",@phonenos,@nameofstop,@busstartstatus);SELECT @phonenos as PhoneNos;SELECT @nameofstop as NameOfStop;SELECT @busstartstatus as BusStartStatus',function(err,result){
console.log("connection.query('call addtion("'+tr+'","'+lat+'","'+long+'","'+sp+'","'+dat+'","'+start+'","'+stop+'",@phonenos,@nameofstop,@busstartstatus);SELECT @phonenos as PhoneNos;SELECT @nameofstop as NameOfStop;SELECT @busstartstatus as BusStartStatus'");
我的问题是我有
24245676856859870D0A,242457658658786870D0A,24245676856859870D0A,242457658658786870D0A,24245676856859870D0A,242457658658786870D0A,24245676856859870D0A,242457658658786870D0A,24245676856859870D0A,242457658658786870D0A,24245676856859870D0A,242457658658786870D0A,24245676856859870D0A,242457658658786870D0A,24245676856859870D0A,242457658658786870D0A
现在它只采用lastdata,即242457658658786870D0A
答案 0 :(得分:0)
如果在数组中给定数据存储,则使用像此一样的foreach循环
foreach($data as $str)
{
echo $str."<br>";
}