Hi, i have a table.. with 7-8 fields...

Now, 3 of my fields, I want to be unique, however no INDIVIDUAL field
will be unique...

IE I can have values

Smith, 7, 8, (& extra fields here...)
Smith, 7, 5, (& extra fields here...)
Smith, 6, 5, (& extra fields here...)
Smith, 6, 3, (& extra fields here...)
John, 6, 5, (& extra fields here...)

Ie the 3 fields can have duplicate entries - two '5's' in the 3rd column, etc..
multiple Smiths etc...

HOWEVER, I do not want two lots of

Smith, 6, 5, (& extra fields here...)
Smith, 6, 5, (& extra fields here...)

QUESTION

Is there a way we can use the INSERT command, - But compare the 3
fields, & see if there is already a table entry with that
combination...

and only insert a new row, if there is no match for ALL 3 of the first
3 fields....

Or - Will I need to do a SELECT command - & then loop through the
array & see if it exists already...


Does this make sense ?

-- 
G
NZ community groups - [EMAIL PROTECTED]
NZ-Website space offered.


Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php-list/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to