In my MySQL table I have a column name
, and there are various repeating names within the table. If I want to display all other column formation for all the people with name chris
I can use:
$sql = mysql_query("SELECT * FROM favorites WHERE name='$name'")
if($info = mysql_fetch_assoc($sql))
echo {$info['name']}
echo {$info['age']}
echo {$info['address']}
But then I want to echo the details of the second chris
, in the table who could be in any random row within the table I can't specify that information. Is there a way to accomplish this? Thank you.