Pullo, the little tid-bit, quoted below, gives me the impression that he wants them grouped by the value in the stream field. Perhaps, altering your sample code to reflect 'group by' and 'order by' clauses in the sql, and required alterations to the loop code, would make it more clear. Though, I may be wrong on this.

pankajbadatia said:

i just dont want output labellled as stream1 again second time

Pullo
—
2013-01-20T12:12:34Z —
#12

Hey Serenarules,

Surely, GROUP BY would only make sense if each stream can be associated with multiple films and had a column that you could apply an aggregate function to.

For example:

$query = "SELECT stream, MIN(price) FROM pank GROUP BY stream";

Or did I miss something?

Serenarules
—
2013-01-20T12:28:40Z —
#13

Possible. Or I did. Heh. According to his sample, stream 1 is indeed used with many entries, much like a category. I get the impression these may not be entered in order. So grouping them by stream in asc order would help in listing them out.

pankajbadatia said:

stream1title of the movie1cast1director2

stream1title of the movie2cast2director2

stream2 title of the movie 3cast3director3

pankajbadatia
—
2013-01-20T12:31:02Z —
#14

yes i think sir Serenarules got my point could u just help me reorgainsing the code$query = "SELECT stream, MIN(price) FROM pank GROUP BY stream";