mySQL if X > Y Do not save information
<p>I have a function that stores returned information from a API. </p>

<p>I already have a if statement that tells the user the accuracy of a returned call was too low. But how do I do the same for my mysql statement?</p>

<pre><code>if(tag.uid == 0) s += "I got something, but the data wasn't clear. Sorry.";
     if(tag.confidence &lt; 80) {
      s += "&lt;li&gt;User identification accuracy was too low, please try again&lt;/li&gt;";
    }
     else if(tag.uid) { s += "&lt;li&gt; User:" + uid + "&lt;/li&gt;";
     if(tag.uid) s += "&lt;li&gt; Accuracy:" + tag.confidence + "%" + "&lt;/li&gt;";
     if(tag.uid) s += "&lt;li&gt; Timestamp:" + log_time + "&lt;/li&gt;";
    }


    } 
    if(photo.tags.length) {
      if (window.XMLHttpRequest) {
        xmlhttp = new XMLHttpRequest();
      }
      xmlhttp.open("GET", "mysql/save.php?uid=" + tag.uid + "&amp;month=" + month + "&amp;day=" + day + "&amp;hours=" + hours + "&amp;min=" + min + "&amp;suffix=" + suffix + "&amp;accuracy=" + tag.confidence,  true);
      xmlhttp.send();
    } 
</code></pre>

<p>I would think its pretty much the same as the previous statement but do not know how to write the error statement as I dont want to alert the user of the error, just not save any information till the accuracy rate improves. </p>
