如果执行操作,如果列表中的值我正在寻找

时间:2013-08-08 11:14:35

标签: php if-statement

我是包含以下代码的数据。

$parametre = mysql_query("select * from faturaparametre where musteri='$musteri' and 
urungrubu='$urungrubu' and tasimasekli='$tasimasekli' and donem<= '$tarih' and donem2>= '$tarih' and teslimnoktasi='$teslimnoktasi1' and $agirlik BETWEEN min and max");
while($parametresonuc = mysql_fetch_array($parametre)) {


$fatparametreid = $parametresonuc[id];
$ynadresno = $parametresonuc[yuklemenokta];

如果您没有以下变量,请跳过此过程:如果搜索过程中最后一个变量没有中断,则列表中的下一个变量如何执行此操作?

    $adresil1 = mysql_query("select * from adresler where id='$yuklemenokta'");
$adressonuc1 = mysql_fetch_array($adresil1);


$yuklemeadresno = $adressonuc1[adresno];
$yuklemeil = $adressonuc1[noktail];
$yuklemeilce = $adressonuc1[noktailce];
$yuklemeilb = "il".$yuklemeil;

此代码不会运行多个优先级查找。而且找不到完全相同的东西

if(eregi($ynadresno, "$yuklemeadresno")) {


$ftid = $fatparametreid;


}elseif(eregi($ynadresno, "$yuklemeilce")) {


$ftid = $fatparametreid;


}elseif(eregi($ynadresno, "$yuklemeilb")) {


$ftid = $fatparametreid;


}else {


}

1 个答案:

答案 0 :(得分:0)

应引用数组键,

$yuklemeadresno = $adressonuc1['adresno'];
$yuklemeil = $adressonuc1['noktail'];
$yuklemeilce = $adressonuc1['noktailce'];
$yuklemeilb = "il".$yuklemeil;