Good day.
There is a request
$id= urldecode($_GET["id"]); $value= urldecode($_GET["value"]); $property= urldecode($_GET["property"]); $this->Vipolnit_Zapros("UPDATE students SET $property='$value' WHERE id='$id';"); -------------------- public function ConnectDB() { $result = new mysqli(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE); // настройки Базы данных if ($mysqli->connect_error) { echo 'Ошибка подключения (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error; return false; } else{ $result->set_charset("utf8"); return $result; } } public function Vipolnit_Zapros($ZAPROS) { $conn = $this->ConnectDB(); $data = array(); if($conn->connect_error) return 'false'; else $result = $conn->query("$ZAPROS"); if(!$result) { echo 'Error' . mysql_error(); exit(); } if ($result->num_rows > 0){ while($row = $result->fetch_assoc()){ $data[]= $row; } return $data; } return 'false'; } ------------ How do I know if properties have been changed, and if so, write echo "true"; or echo "false"; if there were no affected lines?
Thank.