hi
i ahve a mysql databse in which list of name is stored. i wnate to retrive the data form that databse. i have problem in retriving it. if i have name jack 3 times in my databse, but when i wnat to show the names i get jack jack jack 3 times . i wanted to show only once if they have stored as many as times . ls anybody help me?

hi
i ahve a mysql databse in which list of name is stored. i wnate to retrive the data form that databse. i have problem in retriving it. if i have name jack 3 times in my databse, but when i wnat to show the names i get jack jack jack 3 times . i wanted to show only once if they have stored as many as times . ls anybody help me?

hi,
maybe you can try the sql:

"SELECT DISTINCT FROM $table....."

Thanks For Your HelP It Worked Thank U Very Much

Your question is not clear... but
try this:

$query="SELECT * FROM table_name";
$result=mysql_query($result, $link);

while ($i++ < mysql_num_rows($result) && $rs = mysql_fetch_array($result)){
$retrieved[$i] = $rs;//It will fetch all rows under the field name you specified.
print("$retrieved[$i]");//print("$retrieved[1]"), print("$retrieved[2]") etc. It will print row 1 for print("$retrieved[1]"), row 2 print("$retrieved[2]"), and so on.
}

I hope it would give you an idea to solve your problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.