I am designing a php/mysql site which will display reviews of dvd's and computer games.
On the page will be numerous things, but i want to be able to display the reviewers name and the review.
I am using :
$result = mysql_query("select first_name, last_name from user where user_id like \"$user_id\"; ");
$name = $result["first_name"];
echo ("$name");
this is not getting any results, but if i use a while
$result = mysql_query("select first_name, last_name from user where user_id like \"$user_id\"; ");
while ($row = mysql_fetch_array($result))
$name = $row["first_name"];
echo ("$name");
it does!!!
Is there any way (as small as possible) to JUST get the details and display it rather then having to go through a while statement? I am a newbie so there may be another way?
basically i want to just :
Get first_name from user where user_id like user_id ;
display first_name
TA
Glyn