I use DataTable to display table here is a code:
$(document).ready(function() {
$('#example').dataTable( {
"iDisplayLength": 50,
"sPaginationType": "full_numbers",
"bStateSave": true
} );
} );
</head>
<body>
<table class="display" id="example">
<thead>
<tr>
<th class="id-th"><strong>ID</strong></th>
<th class="date-th"><strong>Date Added</strong></th>
<th class="fullname-th"><strong>Full name</strong></th>
<th class="email-th"><strong>Email</strong></th>
<th class="visits-th"><strong>Visits</strong></th>
<th class="totalleads-th"><strong>Total Leads</strong></th>
<th class="uniqueleads-th"><strong>Unique Leads</strong></th>
<th class="unpaid-th"><strong>Unpaid Leads</strong></th>
<th class="action-th"><strong>Actions</strong></th>
</tr>
</thead>
<tbody>
<?php$query = "SELECT * FROM publishers";
$result = mysql_query($query) or die("Query failed: " . mysql_error());while ($row = mysql_fetch_array($result))
{
$publisher_id = $row['id'];
$publisher_datetime = $row['date_time'];
$publisher_firstname = $row['first_name'];
$publisher_lastname = $row['last_name'];
$publisher_email = $row['email']; ?>
<tr class="">
<td class="id-th"><strong><?php echo $publisher_id; ?></strong></td>
<td class="date-th"><strong><?php echo $publisher_datetime; ?></strong></td>
<td class="fullname-th"><strong><?php echo "$publisher_firstname $publisher_lastname"; ?></strong></td>
<td class="email-th"><strong><?php echo $publisher_email; ?></strong></td>
<td class="visits-th"><strong><?php echo $publisher_visits; ?></strong></td>
<td class="totalleads-th"><strong><?php echo $publisher_total; ?></strong></td>
<td class="uniqueleads-th"><strong><?php echo $publisher_unique; ?></strong></td>
<td class="unpaid-th"><strong><?php echo $publisher_unpaid; ?></strong></td>
<td class="action-th">
<ul class="button-table-head">
<li><div class="button-head edit-icon"><a href="#" class="sweet-tooltip" data-text-tooltip="Edit" data-style-tooltip="tooltip-mini-slick"><span>Edit</span></a></div></li>
<li><div class="button-head delete-icon"><a href="#" class="sweet-tooltip" data-text-tooltip="Delete" data-style-tooltip="tooltip-mini-slick" onclick="jConfirm('Are you sure you want to delete this publisher?', 'Delete publisher', function(r) {
jAlert('Publisher deleted');
});"><span>Delete</span></a></div></li>
</ul>
</td>
</tr><?php } ?></tbody></table>
So now my question is - when I edit or delete row - do I have to RELOAD page each time in order for update to show ? I tried reading the instructions on DataTable, but I really don't understand it.
Thanks for tips !