<?php
include("db.php");
$db->updateAry("query_table",array("status"=>0),"where school_id='".$_SESSION["admin"]["school_id"]."'");

$db->insertAry("query_table",array("query"=>$_REQUEST["query"],"status"=>$_REQUEST["status"],"school_id"=>$_SESSION["admin"]["school_id"],"added_by"=>$_SESSION["admin"]["uid"]));
if($db->getErMsg()==""){
	echo "Thank You !! record update successfully";
}else{
	echo $db->getLastQuery()."Error :".$db->getErMsg();
}
?>