Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

MYSQL Query - Some results don't return -


i have problem im sql query:

select table_2.id, sum(table_2.time + table_4.time + table_6.time + table_8.time + table_10.time + table_12.time) total_time, sum(table_2.connects + table_4.connects + table_6.connects + table_8.connects + table_10.connects + table_12.connects) total_connects table_2   inner join table_4 on table_2.id = table_4.id   inner join table_6 on table_2.id = table_6.id   inner join table_8 on table_2.id = table_8.id   inner join table_10 on table_2.id = table_10.id   inner join table_12 on table_2.id = table_12.id group table_2.authid order total_time desc 

ok, have script grabs user ids , time spent , puts in mysql tables depending on forum have entered. query above seems working fine users have entered forums, because others haven't entered in forums don't return result.

the id same, users id , connects number of times user enters specific forum.

if understand problem , know answear please let me know, otherwise i'll try explain better

thanks

i think way may be:

select id, sum(time), sum(connects)  (     select id, time, connects table_2 union     select id, time, connects table_4 union     select id, time, connects table_6 union     select id, time, connects table_8 union     select id, time, connects table_10 union     select id, time, connects table_12 ) uniontable group id 

since have same fields.

edit: , sounds may not such strange idea merge them 1 table, if want count total time ;)

edit 2: i'm sorry, wasn't valid sql @ all. should better.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -