<?php
	include($_SERVER['DOCUMENT_ROOT'] ."/_ps2020/config/connect.php");

	$sid = $_GET["sid"];
	// $sOrder = $_GET["sOrder"];

		if ($result = $conn->query("DELETE FROM user_account WHERE user_id='".$sid."'") === TRUE) {

			// $result = $conn->query("UPDATE user SET order_id='".$sOrder."' WHERE order_id>'".$sOrder."'");

			// $orderID = $sid;

			// $res_reAllocateID = $conn->query("SELECT * FROM user WHERE user_id > '$sid' ");
			// 	if($res_reAllocateID) {
			// 		while ( $row = $res_reAllocateID->fetch_assoc() ){
			// 			// $orderID_new = $orderID + 1;
			// 			$result = $conn->query("UPDATE user_account SET user_id = '$orderID' WHERE user_id = ".$row['user_id']." ");
			// 			$orderID++;
			// 		}
			// 	}

			echo 1;
		}

   $conn->close();
?>