zero-perfoliate
zero-perfoliate

Author Topic: Problem : mysql_fetch_array() function not working. PLease HElp  (Read 577 times)

Offline babydolphin

  • New PHP Members
  • Posts: 1
  • Karma: +0/-0
Problem : mysql_fetch_array() function not working. PLease HElp
« on: October 13, 2008, 08:13:54 PM »
Hi, i new to php. What is wrong with the following codes.

<?php
   include "login.php";
   $sql = "select * from news ";
   $result = mysql_query($sql);
   while ($row = mysql_fetch_array($result,mysql_both))
   {   
               echo "done";
     }
?>

When i run the above php. The error is as below. Is it because the function is no longer available.

Warning: mysql_fetch_array() [function.mysql-fetch-array]: The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH. in c:\wamp\www\bmc (halim's)\web\test.php on line 5

 

zero-perfoliate