This forum has been really helpful. Maybe I'm brain-fried, but I can't get this to work. I spent all afternoon searching the forum, but I'm afraid I'm not searching on the right keyword. I know it's something simple. I'm giving up for the day, and will re-visit the issue in the morning (I'm at work). Maybe someone could shed some light in the meantime . . .
I retrieve a one-record query from my database. I'm trying to access one field in the array. I've tried by name and by reference ([0]), and I'm getting nowhere.
snippet of code attached:
<?
$result = mysql_query ("select * from table_name where ... ");
$num_rows = mysql_num_rows ($result);
echo $num_rows;
while ($a_row = mysql_fetch_row($result))
{
$field = $a_row['field_name'];
print $field;
}
?>
I know I'm getting a result, 'cause it will print "1" ($num_rows). And it will print every field in the record if I loop through, but I don't want all of them to print!
thanks for the help!