<?php
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created: 11/21/2018	ELL
	
	include ("check_session.php");
		
	$table = $_REQUEST['table'];
	$where = $_REQUEST['where'];
	$no_prefix = $_REQUEST['no_prefix'];
	if (isset($no_prefix) && ($no_prefix == 1))
		$prefix = "";
	else
		$prefix = BWB_TABLE_PREFIX;
		
	if (!isset($table) || !isset($where) || ($table == "") || ($where == ""))	{
		echo -1;
		exit;
	}
	
	// Delete head.
	$query = "DELETE FROM " . $prefix . $table . " WHERE " . $where;
	$cnt = $bwb_dbh->exec($query);

	echo $cnt;
?>