Jump to content

i dont want resemblance on the result -need help-


webtuto

Recommended Posts

hey

i have a query that look like this

 

$sql = mysql_query("select * from table where user='$cat'");

 

and on the table on the database i have names that are similar

but while using mysql_fetch_array i dont want the names to be similar on the page while posting results

 

so how can i do that ?

I think if you want to do it that way, your going to have to use GROUP BY as well.

 

SELECT DISTINCT * FROM `song` WHERE category='$cat' GROUP BY category

 

If that doesn't work, you may have to just manually type all the fields

 

SELECT DISTINCT field1, field2 FROM `song` WHERE category='$cat'

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.