// $id is unique, no duplicates
$query="e;SELECT field02 FROM table01 WHERE field01=$id"e;;
$result=mysql_query($query);
$row=mysql_fetch_array($result);
// here is the value I want
$myValue=$rowї"e;field02"e;];
So is all that necessary ? Maybe there is a faster way ?
you could use mysql_result() if you are just wanting to select 1 single result... ie: just 1 id #.
If you are returning multiple ID's in one query (say 5 or 10) then yeah, mysql_fetch_assoc (or array, whichever you prefer) is the better way to do this.
No, I didn't set the ID field as an "index" but that sounds like something I might want to do, is that what it's called, an "index" ? I'm still getting the hang of MySQL.
I'll check out that mysql_result() function as well.
Thanks.
PS - I'll use the php tags from now on, sorry about that.