PHP Check duplicate data and Execute if not
<p>I had a trouble with my PHP Msyql Check data. Source will be see below :</p>

<pre><code>$cek_saldo=mysql_num_rows(mysql_query
("SELECT badge_id, bulan, jns_saldo FROM t_saldo WHERE badge_id='$badge_id' AND bulan='Januari' AND jns_saldo='Tabungan Wajib'"));

if ($cek_saldo &gt; 0)
{
    include ("manage_saldo.php");
    echo "&lt;div class='emp'&gt;Saldo already added.&lt;/div&gt;";
}
else
{
Save query data.
}
</code></pre>

<p>I example :<br>
jns_saldo is "Tabungan Wajib"<br>
Badge ID is 165520<br>
Bulan is Januari</p>

<p>So if the example data same with in the table, then give the message "Saldo already added.".
If not, PHP execute to else statement, that's save the data.</p>
