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

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

		if ( $conn->query("UPDATE user_account SET accountType = 0, school_id = 0, class_id = 0 WHERE user_id='".$sid."'") === TRUE ){
			echo 1;
		}
		else
			echo 0;
		// if ($result = $conn->query("DELETE FROM user_account WHERE user_id='".$sid."'") === TRUE) {
		// 	$result = $conn->query("UPDATE user_account SET user_id='".$sOrder."' WHERE user_id>'".$sOrder."'");
		// }

   $conn->close();
?>