Reply to Re: grouping in a table

Your name:

Reply:


Posted by strawberry on 10/02/06 22:54

mantrid wrote:
> I have records from a database that are extracted with php and displayed in
> a table.
> Data in some of the fields is replicated
>
> eg
> something1,item1,somethingelse1
> something1,item1,somethingelse2
> something1,item2,somethingelse3
> something1,item2,somethingelse4
> something2,item1,somethingelse5
> something2,item1,somethingelse6
> something2,item2,somethingelse7
> something2,item2,somethingelse8
>
> i wish to tidy this up and make it more readable by putting repeated fields
> as a header row or something along those lines
> eg
>
> something1
> item1
> somethingelse1
> somethingelse2
> item2
> somethingelse3
> somethingelse4
>
> something2
> item1
> somethingelse5
> somethingelse6
> item2
> somethingelse7
> somethingelse8
>
> I think I can do it using about 3 sql statements two of which use grouping,
> but I would like to know if there is a more elegant solution using the one
> sql and somehow doing the grouping in the php.
>
> Anyone done anything similar, or seen an example out there?
>
> Thanks Ian

why not do the grouping in sql. It might just be simpler abd quicker

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация