With your query maybe but many queries multiple elements and multiple rows take for example
select user_id, f_name,s_name,email from users where f_name LIKE '%fr%';
on a table with this
user_id | f_name | s_name | email
1 | frank | foo | foo@bar.com
2 | fred | bar | bar@foo.com
This would return four elements and two rows (in this case the entire table)
so to access the first name you would do
<?
while($row=mysql_fetch_array($result))
{
echo("the first name of user ".$row['user_id']." is ".$row['f_name']."<br />\n";
}
?>
With regards to your error. try putting an or die statement after the mysql_query like this
<?
$result=mysql_query($sql) or die(mysql_error());
?>
HTH
Rob