H
H
Guest
Hi, I am a PHP newbie, and I wanted to know how to echo just one value from mysql.
I have tried this, but it prints all of the values from the MemberID column instead of the last one, which is what I want:
$memberid = mysql_query("SELECT MemberID FROM members
WHERE EmailAddress = '$email' AND Password = '$password'");
while($row = mysql_fetch_array($memberid))
{
echo $row['MemberID'];
echo "< br />";
}
Thanks in advance.
thanks steve - sorted!
I have tried this, but it prints all of the values from the MemberID column instead of the last one, which is what I want:
$memberid = mysql_query("SELECT MemberID FROM members
WHERE EmailAddress = '$email' AND Password = '$password'");
while($row = mysql_fetch_array($memberid))
{
echo $row['MemberID'];
echo "< br />";
}
Thanks in advance.
thanks steve - sorted!