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.

php - Duplicated Rows with UNIQUE INDEX MySQL and NULL Columns -


table sufix: id, name

(3, 'com') 

table domainname: id, name

(2, 'microsoft') 

table domain: id, name_code, sufix

(1, 2, 3)    -- microsoft.com 

table subdomainname:

(4, 'windows') 

table subdomain: id, name_code, domain

(7, 4, 1)     -- windows.microsoft.com 

table email: id, name, atserver

(3, 'myemail', 7)    -- myemail@windows.microsoft.com (4, 'other', 1)      -- other@microsoft.com 

here problem of foreign key constraints. how can resolve domains , subdomains create emails correctly? i'm having problems unique index null values, example, solution maybe:

table email: id, name, subdomain, domain

(3, 'myemail', 7, null)  -- myemail@windows.microsoft.com (4, 'other', null, 1)    -- other@microsoft.com 

but

(5, 'newemail', null, null)  -- duplicated values in table (6, 'newemail', null, null) (7, 'newemail', null, null) (8, 'newemail', null, null) 

and

(**3**, 'myemail', 7, 1)   -- myemail@windows.microsoft.com , myemail@microsoft.com 

how (5, 'newemail', domain_id/subdomain_id, 'domain/subdomain')

so have

(5, 'newemail', 7, 'subdomain') or (5, 'newemail', 1, 'domain')

you still left join subdomain , domain table data 1 need based on 'domain/subdomain' field.

that quick solution. imho db structure not , optimized. should keep domain/subdomain records in 1 table , use emails. table should table fulldomain: id, name_code, domain_name, subdomain_name

(1, 3, 2, 4) -- windows.microsoft.com

or

(1, 3, 2, 0) -- microsoft.com


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 -