$queryvami = mysql_fetch_array($veritabani,"select * FROM urun WHERE kategori = '$kid'") ;
if ($queryvami)
{
$hepsi = $kid;
}
else {
$katlardan = mysql_query($veritabani,"select id FROM kategori WHERE ust_id in ($kid)");
while ($katdanbilgi = mysql_fetch_array($katlardan))
{
$katlarindan = $katdanbilgi["id"];
$katlardanyeni = mysql_query($veritabani,"select id FROM kategori WHERE ust_id in (".$katdanbilgi["id"].")");
while ($katdanyenibilgi = mysql_fetch_array($katlardanyeni))
{
$katlarindanyeni = $katdanyenibilgi["id"];
}
}
$tamsonuc = implode(',',$katlarindan);
$tamsonuchepsi = implode(',',$katlarindanyeni);
$queryvamihepsi = @mysql_fetch_array($veritabani,"select * FROM urun WHERE kategori in ($tamsonuchepsi)");
if(!empty($queryvamihepsi)){
$hepsi = $tamsonuc.",".$tamsonuchepsi;
}
else
{
$hepsi = $tamsonuc;
}
}
sayfa cıktısı
Warning: mysql_fetch_array() expects parameter 2 to be long, string given in /home/u7835868/public_html/ulistkareli.php on line 4
Warning: mysql_query() expects parameter 1 to be string, resource given in /home/u7835868/public_html/ulistkareli.php on line 10
Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in /home/u7835868/public_html/ulistkareli.php on line 11
Warning: implode(): Invalid arguments passed in /home/u7835868/public_html/ulistkareli.php on line 20
Warning: implode(): Invalid arguments passed in /home/u7835868/public_html/ulistkareli.php on line 21