MYSQL_FETCH_ARRAY Only one result
Posted: Fri May 01, 2009 9:02 am
I have another problem, my piece of code is only displaying one result. It should be displaying all results but its not!
I Haven't the slightest clue and I've spent quite a while on it, I tried treating it as an array and giving it a value beside, and using a forloop, tho it didn't work. Heres the code anyway, it should be displaying more than one result! I suppose its a logical error.
Kind Regards,
David Harvey
I Haven't the slightest clue and I've spent quite a while on it, I tried treating it as an array and giving it a value beside, and using a forloop, tho it didn't work. Heres the code anyway, it should be displaying more than one result! I suppose its a logical error.
Code: Select all
$result = mysql_query("SELECT * FROM tbl_Iblog")or die(mysql_error());
$row = mysql_fetch_array($result);
echo "UserName: ".$row['userName'];
echo "<p> </p>";
echo " Post:<p></P> ".$row['uPost'];
echo "<p> </p> <p> </p>";
David Harvey