jTable (www.jtable.org) has great references to Filtering on its website, but its for ASP.NET. I require it to use for PHP, but sadly the documentation made no mention of the APIs for filtering except for the sample ASP.NET server side file.
Anyway, jTables uses:
//Re-load records when user click 'load records' button.
$('#LoadRecordsButton').click(function (e) {
e.preventDefault();
$('#PeopleTableContainer').jtable('load', {
Name: $('#Name').val(),
Branch: $('#Branch').val()
});
});
I can see that I can pass values to the server using the Name and branch, but I don't know how to catch that on the PHP code so I can do a WHERE on my mysql code.
//Load person list from server
$('#PeopleTableContainer').jtable('load', { Age: 78 });
//Get records from database
$result = mysql_query("SELECT * FROM people WHERE Age = '" . $_POST["Age"] . "';");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With