Jump to content

[SOLVED] group similar fields and display corresponding data ?


Recommended Posts

bassically i have a repeat region displaying all the data atm e.g

 

IDS      Names

f1e162c2 death

f5291b9f Rowger

f6814a1f |MOB|B-DoGG

f6814a1f demolition[RUS]

f6814a1f Player0

f7f44761 frog

f8e840a9 mob|roxygirl

fb69016b «dolllars»

 

now i wish to expand on this and only show ID's that have more than 1 entry. like it would the out put below from the above example

 

f6814a1f |MOB|B-DoGG

f6814a1f demolition[RUS]

f6814a1f Player0

 

 

can it be done in a sql statement ? the current one is "SELECT * FROM guid ORDER BY IDS ASC"

or do i have to make some kinda of php code that checks if theres is more than 1 of the same ID"S ???

 

 

thx for the responce unforchantly when i try this a get a mysql error 1111 and output of invailed use of group function.

 

i have tryed

 

"SELECT id,name,count(*) as idgroups

FROM guid

GROUP BY id"

 

but it groups simular together so only one is displayed :(

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.