How to fetch all result rows in MySQL+PHP?
You know, if I use mysql_fetch_assoc()
, it only returns one result row as an associative array. I am using AJAX to fetch the data in a MySQL table.
$result=mysql_query("select * from questions where announcementid='$taskid'")or die(mysql_error());
How to return the value of $result which is an array to the page where an Ajax request was fired?