0
我有這樣的代碼:PHP in_array沒有找到值,是有
$sql_zt = "SELECT
inh_pr.extra_bew_zetten AS extra_bew_zetten
FROM 5_offerte_id AS off
LEFT JOIN 6_offerte_inh AS off_inh
ON off_inh.offerte_id = off.id
LEFT JOIN 3_product_folder AS fld
ON fld.folder_id = off_inh.folder_id
LEFT JOIN 0_calculatie_inh_id_geg_lntk_product AS inh_pr
ON inh_pr.calculatie_inh_id = fld.product_id
WHERE off.dossier_id = ".$row['id']." AND inh_pr.extra_bew_zetten = 'ja' AND off.offerte_nr = (SELECT MAX(offerte_nr) FROM 5_offerte_id WHERE dossier_id = ".$row['id'].") ";
if(!$res_zt = mysql_query($sql_zt,$con))
{
include('includes/errors/database_error.php');
}
if(mysql_num_rows($res_zt) > 0)
{
if(in_array('ja', mysql_fetch_array($res_zt)))
{
echo '<img border="0" src="images/icon/zetten.png" title="'.$lang['zetten'].'"> ';
}
}
價值「JA」不與in_array找到。可能是什麼問題?
可能有任何的虛擬空間,更是打破了比較數組中的字符串? ''ja'!='ja'' – philreed
請注意'AND inh_pr.extra_bew_zetten ='ja''會呈現爲INNER JOIN – Strawberry