Dear my friends....
 
I am trying to read the content per line of a query
 result with "mysql_fetch_row". But I got this error
 message :
 "
 Musingin homepage
 
koneksi sukses. Sukses memilih database. Sukses
 melakukan query. Besar hasil query 1. 
Warning: mysql_fetch_row(): supplied argument is not a
 valid MySQL result resource in
 /srv/www/htdocs/i-am-e-system/cgi-bin/tulis.php on
 line 20
 Akhir baris. 
"
 
Could any body tell me where my mistake?
 
Here is my codes under belom:
 <?PHP
 $konek=mysql_connect("localhost", "prabu",
 "password");
 if ($konek){
       echo "koneksi sukses.\n";
       mysql_select_db("berita");
       echo "Sukses memilih database.\n";
       $kalimatsql="
       SELECT noberita, pengirim, tanggal, namafile 
      FROM berita
       ";
       $hasil = mysql_query($kalimatsql, $konek);
       echo "Sukses melakukan query.\n";
       $besarhasil=sizeof($hasil);
       echo "Besar hasil query $besarhasil.\n";
       while ($baris = mysql_fetch_row($hasil)){
            
list($noberita,$pengirim,$tanggal,$namafile)=$baris;
             echo "
             Nomer berita            : $noberita\n
             Pengirim            : $pengirim\n
             Tanggal                  : $tanggal\n
             Nama file            : $namafile\n
             ";
       }      
      echo "Akhir baris.\n";
 
} else echo "Gagal konek.\n";
 mysql_close($konek);
 ?>
 
Thank you very much in advance.
 


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to