Question about datatables and sql

J

jm

I have three rows from a mysql database.

id, name, value

It prints three rows in my web form c#.

I want to know how to combine all the results in one row, filtered where needs be.

So, instead of;

1 johnny 5
2 bubba 6
3 jack 7

I want:
id name value
1 johnny, bubbba, jack 5,6,7

thank you for any help.
 
J

jm

I have three rows from a mysql database.

id, name, value

It prints three rows in my web form c#.

I want to know how to combine all the results in one row, filtered where needs be.

So, instead of;

1 johnny 5
2 bubba 6
3 jack 7

I want:
id name value
1 johnny, bubbba, jack 5,6,7

thank you for any help.

First, I should have said they all had the same order id, not
different ones like above. But what I ended up doing was loading my
dataset from my database into another datatable (virtual in memory)
after the data was parsed. From there, I attached to a datagrid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top