sql den tek kayıt çekmek.

Katılım
4 Temmuz 2006
Mesajlar
1
Merhaba,

cep_tel_liste.php de kayıtları listeledikten sonra, herhangi bir kayıtın üzerine tıkalyıp o ilanın ayrıntısını pop up la acmak istiyorum.. ilndetay bölümünde hata alıyorum..

hata:Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/ilan26/public_html/ilandetay.php on line 16



cep_tel_liste.php
----------------
<html><head><title>ilan26</title>
<META http-equiv="content-type" content="text/html; charset=ISO-8859-9">
<META http-equiv="Content-Type" content="text/html; charset=windows-1254">
<meta http-equiv="Refresh" content="no-cache">
<link rel="stylesheet" type="text/css" href="stil.css">
<script>
function ilandetay(ilanid) {
window.open("ilandetay.php?ceptel_id="+ilanid,"_bl ank","status=no,scrollbars=yes,width=550,height=20 0,left=50,top=25")
}
</script>
</head>
<body oncontextmenu="return false" leftmargin=0 topmargin=0 background="ico/ST013_L.jpg" bgproperties="FIXED"><div align="center">
<?
include 'yol.php';
$oku = mysql_query ('select * from ceptel ');
$kayit_sayisi = mysql_num_rows ($oku);
$i = 0;
$login = false;
?>
<table border='1' align='CENTER' bgcolor='#FDE1A8'>
<th colspan='8' align='CENTER' bgcolor='#0070DF'><font face='' color='White'>Cep Telefonu Ilan Listesi</font></th>
<tr>
<?
while ($i < $kayit_sayisi)
{
$ceptel_id = mysql_result($oku,$i,'ceptel_id'); // hata burdan
$marka = mysql_result($oku,$i,'marka');
$model = mysql_result($oku,$i,'model');
$fiyat = mysql_result($oku,$i,'fiyat');
$aciklama = mysql_result($oku,$i,'aciklama');
$ilan_sahibi = mysql_result($oku,$i,'ilan_sahibi');
$telefon = mysql_result($oku,$i,'telefon');
$ceptell = mysql_result($oku,$i,'ceptell');
$email = mysql_result($oku,$i,'email');
$hit = mysql_result($oku,$i,'hit'); // buraya kadar hata

?>


<td width="100" align="CENTER">);><?=$aciklama;?>
<td align='CENTER'><?=$marka;?>
<td align='CENTER'><?=$model;?>
<td align='CENTER'><?=$fiyat;?>
<td align='CENTER'><?=$telefon;?>
<td align='CENTER'><?=$ceptell;?>
<td align='CENTER'><?=$email;?>
</tr>

<?
$i++;
}
echo '</table>';
?>


</div></body></html>

ilandetay.php
------------
<html><head><title>ilan26</title>
<META http-equiv="content-type" content="text/html; charset=ISO-8859-9">
<META http-equiv="Content-Type" content="text/html; charset=windows-1254">
<meta http-equiv="Refresh" content="no-cache">
<link rel="stylesheet" type="text/css" href="stil.css">
</head>
<body oncontextmenu="return false" leftmargin=0 topmargin=0 background="ico/ST013_L.jpg" bgproperties="FIXED"><div align="center">
<?
include 'yol.php';
$oku = mysql_query ('select from ceptel where ceptel_id=$ceptel_id ');
?>
<table border='1' align='CENTER' bgcolor='#FDE1A8'>
<th colspan='8' align='CENTER' bgcolor='#0070DF'><font face='' color='White'>Cep Telefonu Ilan Listesi</font></th>
<tr>
<?
$ceptel_id = mysql_result($oku,'ceptel_id');
$marka = mysql_result($oku,'marka');
$model = mysql_result($oku,'model');
$fiyat = mysql_result($oku,'fiyat');
$aciklama = mysql_result($oku,'aciklama');
$ilan_sahibi = mysql_result($oku,'ilan_sahibi');
$telefon = mysql_result($oku,'telefon');
$ceptell = mysql_result($oku,'ceptell');
$email = mysql_result($oku,'email');
$hit = mysql_result($oku,'hit');
?>
<table border="1" align="CENTER" bgcolor="#FDE1A8">
<th colspan="8" align="CENTER" bgcolor="#0070DF"><font face="" color="White">Cep Telefonu Ilan Listesi</font></th>
<tr>

<td align="CENTER"><?=$ceptel_id;?>)
<td align="CENTER"><?=$marka;?>
<td align="CENTER"><?=$model;?>
<td align="CENTER"><?=$fiyat;?>
<td align="CENTER"><?=$aciklama;?>
<td align="CENTER"><?=$ilan_sahibi;?>
<td align="CENTER"><?=$tarih;?>
<td align="CENTER"><?=$telefon;?>
<td align="CENTER"><?=$ceptell;?>
<td align="CENTER"><?=$email;?>
<td align="CENTER"><?=$hit;?>
</tr>
</table>

</div></body></html>
 
Üst