Hi Guys
no matter what i try i can't get this right
i either get nothing or resource id 2
im trying to run this SQL Query
which should simply return a number 2
my code is
what am i missing?
no matter what i try i can't get this right
i either get nothing or resource id 2
im trying to run this SQL Query
Code:
SELECT credits FROM members WHERE username='sean'
my code is
Code:
<?php
$con = mysql_connect("localhost","user","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("members", $con);
$result = mysql_query("SELECT credits FROM members WHERE username='sean'
while($row = mysql_fetch_array($result))
echo $results['credits'];
?>
what am i missing?