My php needs help. Can't display a name from mysql_fetch_row?

lyderslim

New member
Nothing comes up. What am I doing wrong? "First Name" comes up, but the result from the query doesn't.

$qry = "SELECT firstname
FROM employee
WHERE emp_id = '1'";
$result = mysql_query($qry);
$row = mysql_fetch_row($result);
echo "First Name :".$row['firstname']." ";


When I run that SELECT in a SQL window, I get the firstname.
 
Back
Top