Forum Moderators: coopster

Message Too Old, No Replies

mysql fetch row

         

Hitman3266

5:54 am on Feb 13, 2007 (gmt 0)

10+ Year Member




mysql_connect("$server_ip:$mysql_port","$user","$pw");
mysql_select_db("$db") or die(mysql_error());

$fetchname = "SELECT * FROM realmlist";
$row = mysql_query($fetchname);

while($queryresult=mysql_fetch_array($row))

{$igda=($queryresult["name"]);}

echo "<center><span class='style1'>$igda</span></center>";

mysql_free_result($row);

ive had this problem before where it only outputs one result, so if i have 2 names in there, itll output only one name, i want it to ouput the whole row

cameraman

6:18 am on Feb 13, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your echo isn't inside the while loop. Move the closing brace to below the echo.