<?php
//printf('UPDATE %s SET geloescht = 1 WHERE id = %d', $this->tb, $newvals['id']);
require_once("global_functions.php");
//printf($oldvals['id']);
$query2 = sprintf('UPDATE %s SET geloescht = 1 WHERE id = %d or ID = %d', $this->tb, $oldvals['id'], $oldvals['ID']);
if ($this->MyQuery($query2)) {
	
	$string="Table: ".$this->tb." ID: ".$this->rec;
	foreach ($changed as $key)
	{
		$string.= " deleted " . $this->tb . ": ".$key ." ". $oldvals[$key];
	}
	//echo $string;
	//log_audit("Config changed: ".$string);
	
	/*
	if ($this->tb == "products") {
		$query2 = sprintf('UPDATE categories_sortiment_products SET geloescht = 1 WHERE product_id = %d', $oldvals['ID']);
		$this->MyQuery($query2);
	} else if ($this->tb == "categories") {
		$query2 = sprintf('UPDATE categories_sortiment_categories SET geloescht = 1 WHERE categories_id = %d', $oldvals['ID']);
		$this->MyQuery($query2);
	} else if ($this->tb == "kassa") {
		$query2 = sprintf('UPDATE categories_sortiment_kassa SET geloescht = 1 WHERE kassa_id = %d', $oldvals['id']);
		$this->MyQuery($query2);
	}
	*/
	
	// Hier muss false rein, damit der Datensatz nicht wirklich gelöscht wird!!!
	return false;
} 
?>