Hi
I have a table in mysql called credits, the table consists of username and credits. The credits field will have a value of credits in it. I am trying to select the value from the credits field and return it to the php.
The problem is that when I echo the result to test it, it returns
Resource id #2 instead of the value in the database.
Any ideas heres the code
[PHP
$username = $HTTP_GET_VARS['username'];
$db = mysql_pconnect ('localhost','root','');
if (!$db)
{
exit;
}
mysql_select_db('Users');
// Select credit amount using username
$query = "select credits from credits where username =$username";
$result = mysql_query($query);
echo $result;
[/code]