Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

C# reading multiple results to an ?array? (vs 2010, mysql database)

$
0
0
Hey there guys. Just a quick question, I'm working in a good project (for me) in my spare time whilst I'm going through uni. I have however encountered a problem. I'm sure i know of a solution, just not how to go about it!

So in essence, all I want to do, is select a load of ID's where their parent ID =?

Let me see if I can explain a little bit better:

Table Info - ID, Employer_ID

so lets say theres 5 staff. (ID's = 1,2,3,4,5) and theres one employer (ID=1)

then a simple sql query ( SELECT * FROM Table WHERE Employer_ID = 1;)

Now i have this working fine inside the phpmyadmin for the database. I am also able to read single rows of data based on quite complex queries into c# and process the information as I please. But how do i write these ID's to a list, array, listarray, or prehaps a datagrid?

Any help will be much appreciated. If i have not been clear, please let me know :)

Thanks in advance, Regards Nick :)

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>