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 ?

Link to comment
Share on other sites

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'

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.