Excuse me (my text seems not understandable; English not my native language; and I almost know nothing in MySQL; I try to learn it)
For example, two rows exist in a database
The first row with values: First value | Second value
The second row with values: Third value | Fourth value
In a html form (with 2 fields) visitor can type values to add to the database (table). If visitor types in the form values: First value and Second value, and try to add to the database I need to prevent it, because in the database there is already a row with values: First value | Second value.
But if visitor types First value and Fourth value I need to allow it to add to the database, because in the database there is no row with values First value | Fourth value. So as a result visitor adds to the database new row with values First value | Fourth value. And after that if a visitor types values First value and Fourth value then I need to prevent it, because there is a row with values First value | Fourth value
With above showed code I can only check if in whole table exists any of values
Sorry for waste of your time if does not understandable....
May be latter I will find solution myself:)