Jump to content

Mysql_Fetch_Row Hatası...


Recommended Posts

Merhaba arkadaşlar

 

İnternet üzerinde gördüğüm bir scripti arkadaşımın sitesine kurduk her şey tamam sorunsuz ancak yönetim panelinde sayfa düzenlemek istediğimde şöyle bir hata alıyorum

 

 

 

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource inC:\wamp\www\yonetim\sayfa_duzenle.php on line 10

 

sayfa_duzenle.php ise şu şekilde ;

 

 

[spoiler]

<?php
ob_start();
@session_start();
include('../include/baglan.php');
if(isset($_SESSION['kullan']))
{
include('fckeditor/fckeditor.php');
$oku=$_REQUEST["oku"];
$veri=mysql_query("Select sid,baslik,konu,sira,aciklama,anahtarkelime from  sayfa where sid='$oku'");
list($sid,$baslik,$konu,$sira,$aciklama,$anahtarkelime)=mysql_fetch_row($veri);
?>
<style type="text/css">
<!--
.style1 {
color: #000000;
font-weight: bold;
}
-->
</style>




<form name="form1" method="post" action="main.php?cmd=30&oku=<?php echo $sid;?>">
<input type="hidden" name="id" value="<? $id ?>" />
  <table width="475" border="1">
    <tr>
      <td width="61"><strong>Ba&#351;l&#305;k</strong></td>
      
      <td width="398"><input name="baslik" type="text" id="baslik" value="<?php echo $baslik ?>" size="35"></td>
    </tr>
<tr>
      <td width="61"><strong>Sira No</strong></td>
      
      <td width="398"><input name="sira" type="text" id="sira" size="35" value="<?php  echo $sira ?>" /></td>
</tr>
<tr>
      <td><strong>Sayfa A&ccedil;&#305;klama </strong></td>
 <td><input name="aciklama" type="text" id="aciklama" value="<?php  echo $aciklama ?>" size="35" /></td>
    </tr>
<tr>
      <td><strong>Anahtar Kelimeler </strong></td>
 <td><input name="anahtarkelime" type="text" id="anahtarkelime" value="<?php  echo $anahtarkelime ?>" size="35" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><strong>Konu</strong></td>
      <td><?php
$oFCKeditor = new FCKeditor('yazi') ; // fckeditorun adi 
$oFCKeditor->BasePath = "fckeditor/" ;
$oFCKeditor->Value = $konu;
$oFCKeditor->Width = '542px' ;
$oFCKeditor->Height = '420px' ;
$oFCKeditor->Create() ;


// Boyut ayarlamak istiyorsaniz bunlari create(); den once ekleyin




?></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input type="submit" name="Submit" value="Kaydet" />
        </label>      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
<?php
}
else
{
header("Refresh:0;url=index.php");
}
?>

[/spoiler]

 

Scripti İndirmek İçin : http://rapidshare.com/files/3818333189/Ayyildizdesign-urun.rar

 

acaba sorun nerede?
 

Link to comment
Share on other sites

Sorgu için bunu :"Select * from  sayfa where sid='$oku'"
Gelen veriyi arraylara aktarmak için bunu : extract(mysql_fetch_array($veri));

kullanın ;)

 

Hocam şu anda edit yapamıyorum tam olarak düzenlenmiş şeklini verebilirmisin ? php dosyasının

Link to comment
Share on other sites

Hocam dediğiniz gibi yapıncada bu hatayı veriyor.

 

 

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource inC:\wamp\www\yonetim\sayfa_duzenle.php on line 10

Warning: extract() [function.extract]: First argument should be an array in C:\wamp\www\yonetim\sayfa_duzenle.phpon line 10

 

İsterseniz bir inceleyin ben mi yanlış yapıyorum ?

 

Alakalı PHP dosyası : http://www.mediafire.com/view/?o01838wrujrowup

Link to comment
Share on other sites

Ozaman tabloda 1 id sine sahip kayıt olmayabilir yada sorgu cümlesinde hata olabilir mesela sorguda belirtilen sütun veya tablo isimleri hatalı olabilir vs. bilemiyorum biraz kurcala :)

 

Veritabanı bilgim fazla değil veritabanı dosyasını versem inceleyebilirmisiniz

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...