Thread: Newbie Horror
View Single Post
Old 02-19-2008, 10:49 PM   #3 (permalink)
maZtah
The Acquainted
 
Join Date: Oct 2007
Posts: 170
Thanks: 18
maZtah is an unknown quantity at this point
Default

This should do the trick:

PHP Code:
$szQuery 'SELECT gold FROM users WHERE id='.$iMemberId.' LIMIT 1;
$pResult = mysql_query($szQuery);

$aRow = mysql_fetch_array($pResult); 
HTML Code:
<table>
<tr>
    <td><?php echo $aRow['gold']; ?></td>
</tr>
</table>
Where $iMemberId is the id of the user that is logged in.

PS. There's no need to do a while loop, since you're only fetching one row.
maZtah is offline  
Reply With Quote