Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,994
    Thanks
    120
    Thanked 76 Times in 76 Posts

    prevent same text of title

    the table of submited articles:
    Code:
    key   key
    
    id     language    title
    1      sl             
    2      en           horse
    3      sl
    4      en           horse
    ...
    since there is no key on title column and even if there it would be one, there would be no difference, the records as they are, are taken as legal from databse point of wiev.

    From logical stand point this is not ok (record 2 and 4), don't want to allow same title for two artcles in same language.

    Any other suggestion except throwing away id column

  • #2
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,634
    Thanks
    4
    Thanked 148 Times in 139 Posts
    put a unique key across (language,title) that prevents the same title for the same language


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •