Situation. I record invoice: amount, partner name, invoice date and invoice number.
Need to check if the invoice is not already recorded. So need to check if all the mentioned values are not already recorded (one value is not enough).
At the moment I have solution that at first I check if each of the values exists. Then next code if all the values exists, then warn about duplicate entry.
But there one problem, code check through all rows in certain table. So may be situation that all values are entered, but in multiple rows.

The question is: how to check if multiple values are not already entered in one row

Code:
$query1 = mysql_query("SELECT * FROM $tbl_name WHERE tutorial_author='$tutorial_author'"); //tutorial_title without $ is name of record (column in MySql table)
if(mysql_num_rows($query1) != 0)
{
echo $tutorial_author ." already exists <br>";
//echo $query1 ." query1 <br>";
}
else
{
echo $tutorial_author ." does not exist <br>";
.........

if((mysql_num_rows($query) != 0) or (mysql_num_rows($query1) != 0) or (mysql_num_rows($query2) != 0)) {

echo $submission_date ." or' .$tutorial_title .'or' .$tutorial_author .'already exists <br>";
}