zodehala
02-21-2012, 06:42 PM
This is my code. if $_GET is not null everything is ok but if it s null i am giving following error . how can i correct it?
mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in sip.php on line 131
Sayfalanacak Veri yok.
$sira = 'DESC';
$agent = (isset($_GET["agent"])) ? $_GET["agent"] :'';
$cari = (isset($_GET["cari"])) ? $_GET["cari"] :'';
$urun = (isset($_GET["urun"])) ? $_GET["urun"] :'';
$telno = (isset($_GET["telno"])) ? $_GET["telno"] :'';
$tarih1 = (isset($_GET["date1"])) ? $_GET["date1"] :'';
$tarih2 = (isset($_GET["date2"])) ? $_GET["date2"] :'';
$kuladi = $_COOKIE["kuladi"];
$s1 = "SELECT * FROM $tablo WHERE xcode > 0
AND kuladi = '".$agent."'
AND urun = '".$urun."'
AND telno = '".$telno."'
AND cari = '".$cari."'
ORDER BY kayitzamani $sira";
$s2 = "SELECT count(*) AS total FROM $tablo WHERE xcode > 0
AND kuladi = '".$agent."'
AND urun = '".$urun."'
AND telno = '".$telno."'
AND cari = '".$cari."'";
mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in sip.php on line 131
Sayfalanacak Veri yok.
$sira = 'DESC';
$agent = (isset($_GET["agent"])) ? $_GET["agent"] :'';
$cari = (isset($_GET["cari"])) ? $_GET["cari"] :'';
$urun = (isset($_GET["urun"])) ? $_GET["urun"] :'';
$telno = (isset($_GET["telno"])) ? $_GET["telno"] :'';
$tarih1 = (isset($_GET["date1"])) ? $_GET["date1"] :'';
$tarih2 = (isset($_GET["date2"])) ? $_GET["date2"] :'';
$kuladi = $_COOKIE["kuladi"];
$s1 = "SELECT * FROM $tablo WHERE xcode > 0
AND kuladi = '".$agent."'
AND urun = '".$urun."'
AND telno = '".$telno."'
AND cari = '".$cari."'
ORDER BY kayitzamani $sira";
$s2 = "SELECT count(*) AS total FROM $tablo WHERE xcode > 0
AND kuladi = '".$agent."'
AND urun = '".$urun."'
AND telno = '".$telno."'
AND cari = '".$cari."'";