<?php

/**
 * 	Dear developer!
 *	Never modify events.php file, it is autogenerated.
 *  Modify PHP/EventTemplates/events.txt instead.
 *
 */
 
 class eventclass_assegnatovinha  extends eventsBase
{
	function __construct()
	{
	// fill list of events
		$this->events["BeforeDelete"]=true;


	}

//	handlers

		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
				// Before record deleted
function BeforeDelete($where, &$deleted_values, &$message, &$pageObject)
{

		
//**********  Check if specific record exists  ************

$rs = DB::Query("select * from AnyTable where SomeColumn='SomeValue'");
$data=$rs->fetchAssoc();
if($data)
{
	// if record exists do something
}
else
{
	// if dont exist do something else
}


;		
} // function BeforeDelete

		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		



}
?>
