I've written this code in order to fetch all the records in a table; however for some reason it's not working:
function GetAllData(){
$result = mysql_query("SELECT * FROM a2h_member_type");
while($row = mysql_fetch_array($result))
{
echo $row['member_type_id'] . " " . $row['member_type_name'] . " " . $row['description'];
}
}
It's not getting into the while loop, yet there are 2 records in the table. Any ideas?