<?php
require "../model/configuration.php";
if(isset($_POST['recordToDelete']))
{
$id=$_POST['recordToDelete'];
$delquery=$db->execute("delete from estimatethree_temp_table where id='$id'");
}
$q=$db->execute("select * from estimatethree_temp_table");
$num=$q->num_rows;

if($num==0){
$delquery=$db->execute("TRUNCATE TABLE estimatethree_temp_table");
}
?>