Click to See Complete Forum and Search --> : Need a sql query for..........


dc2698
06-14-2009, 07:25 AM
Hi all,

I need a sql query for:

table: p2c
pid cid
1 1
2 1
3 1
4 2
5 3
6 3

I want to display a HTML table like this:

1 2 3 <-------- unique cid
-----------------------------------------------
1 4 5 <--------- pid
2 6 <--------- pid
3 <--------- pid

Thank you in advance!

chazzy
06-14-2009, 09:53 AM
ok... and why do you think this is purely sql? the best i can think of is to make dynamic sql, but really the display of the data has little to do with how it's stored. it's really about your programming language and how it can give you this in a usable state.