<?php
header('Content-type: application/json');
include '../../config/database.php';
function _command($gid,$products){
	$conn = _connectDB();
	$sql = "UPDATE groupline SET groupline_bank=NULL WHERE groupline_products='".$products."' AND groupline_key='".$gid."'";
	$result = $conn->query($sql);
	$res = ['status'=>true];
	return $res;
}
if(isset($_GET)){
	if(isset($_GET['gid']) AND isset($_GET['p'])){
		$gid = $_GET['gid'];
		$products = $_GET['p'];
		echo json_encode(_command($gid,$products));
	}else{echo json_encode(['status'=>false]);}
}else{echo json_encode(['status'=>false]);}