using jquery to load data from mysql database
<p>I'm currently using jquery's ajax feature or whatever they call it. To load data from mysql database. Its working fine, but one of the built in features of this one is to load all the data which is on the database when you press on backspace and there's no character left on the text box.</p>

<p>Here's my query:</p>

<pre><code>SELECT * FROM prod_table WHERE QTYHAND&gt;0 AND PRODUCT LIKE '$prod%' OR P_DESC LIKE '$desc%' OR CATEGORY LIKE '$cat%'
</code></pre>

<p>As you can see I only want to load the products which has greater than 0 quantity on hand.</p>

<p>I'm using this code to communicate to the php file which has the query on it:</p>

<pre><code>$('#inp').keyup(function(){


                var inpval=$('#inp').val();

            $.ajax({
                type: 'POST',
                data: ({p : inpval}),
          url: 'querys.php',
          success: function(data) {
            $('.result').html(data);

          }





        });

    });
</code></pre>

<p>Is it possible to also filter the data that it outputs so that when I press on backspace and there's no character left. The only products that's going to display are those with greater than 0 quantity?</p>
