$objConnect = mysqli_connect("localhost","board","4051","board") or die("Error Connect to Database"); mysqli_query($objConnect,"set names utf8"); if($_GET["Action"] == "Save" and ! empty($_POST["txtDetails"]) and ! empty($_POST["txtName"])) { //*** Insert Reply ***// $strSQL = "INSERT INTO reply "; $strSQL .="(QuestionID,CreateDate,Details,Name) "; $strSQL .="VALUES "; $strSQL .="('".$_GET["QuestionID"]."','".date("Y-m-d H:i:s")."','".$_POST["txtDetails"]."','".$_POST["txtName"]."') "; $objQuery = mysqli_query($objConnect,$strSQL); //*** Update Reply ***// $strSQL = "UPDATE webboard "; $strSQL .="SET Reply = Reply + 1 WHERE QuestionID = '".$_GET["QuestionID"]."' "; $objQuery = mysqli_query($objConnect,$strSQL); } ?>
Error Query [SELECT * FROM webboard WHERE QuestionID = '53957' ]