DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   Big Repeater Question for you all (http://www.daniweb.com/forums/thread95729.html)

SheSaidImaPregy Nov 6th, 2007 5:37 pm
Big Repeater Question for you all
 
I have a page that a client asked me to make that consists of the following:
Repeater1 (Client Data)
    Label1 = Number of Records
    Repeater2 (More data where ClientID supplied = ClientID on the table) (Limit 4 recs)
    Label2 = Number of Records
    Repeater3 (More data where ClientID supplied = ClientID on the table) (limit 12 recs)
    Label3 = Number of Records
    Repeater4 (More data where ClientID supplied = ClientID on the table) (limit 25 recs)
end repeater
How would you suggest I handle this to eliminate 4 separate queries hitting the database? This is all expecting that I will use the following queries based upon the situation above:
Repeater1 = "SELECT *, (SELECT COUNT(ID) FROM Table1) As Count1, (SELECT COUNT(ID) FROM Table2) As Count2, (SELECT COUNT(ID) FROM Table3) As Count3, FROM Table4 WHERE ID=ID"

How would you suggest I tap the other repeaters along with the first, if it is possible? Please give me suggestions.. should I use a DataSet or just a DataReader? Anything will help. Thank you.

SheSaidImaPregy Nov 6th, 2007 7:05 pm
Re: Big Repeater Question for you all
 
Nevermind, I resolved it. By including many select statements in one, I can then use the "with" statement and bind the rest that way. Thanks anyway!

SheSaidImaPregy Nov 7th, 2007 11:02 am
Re: Big Repeater Question for you all
 
Nevermind... as I thought I solved it, my data provider does not allow multiple queries (Odbc). Any suggestions in combining these queries above? The only thing common they share are the User's ID. I am horrible at creating MySQL queries that are joined or unioned with other selects. Thanks.


All times are GMT -4. The time now is 3:34 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC