Jump to content

[SOLVED] group similar fields and display corresponding data ?


alcoholic1

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 :(

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.