public static function deleteRecords($category=null, $type=null, $referenceid=null, $uid=null)
	{
		$model = self::all();

		if ($category)
		{
			$model->whereEquals('category', $category);
		}

		if ($type)
		{
			$model->whereEquals('type', $type);
		}

		if ($referenceid)
		{
			$model->whereEquals('referenceid', $referenceid);
		}

		if ($uid)
		{
			$model->whereEquals('uid', $uid);
		}

		foreach ($model->rows() as $row)
		{
			if (!$row->destroy())
			{
				return false;
			}
		}

		return true;
	}
public static function deleteRecords($category=null, $type=null, $referenceid=null, $uid=null)
	{
		$model = self::all();

		if ($category)
		{
			$model->whereEquals('category', $category);
		}

		if ($type)
		{
			$model->whereEquals('type', $type);
		}

		if ($referenceid)
		{
			$model->whereEquals('referenceid', $referenceid);
		}

		if ($uid)
		{
			$model->whereEquals('uid', $uid);
		}

		foreach ($model->rows() as $row)
		{
			if (!$row->destroy())
			{
				return false;
			}
		}

		return true;
	}
public static function deleteRecords ( $ category = null , $ type = null , $ referenceid = null , $ uid = null ) { $ model = self :: all ( ) ; if ( $ category ) { $ model -> whereEquals ( 'category' , $ category ) ; } if ( $ type ) { $ model -> whereEquals ( 'type' , $ type ) ; } if ( $ referenceid ) { $ model -> whereEquals ( 'referenceid' , $ referenceid ) ; } if ( $ uid ) { $ model -> whereEquals ( 'uid' , $ uid ) ; } foreach ( $ model -> rows ( ) as $ row ) { if ( ! $ row -> destroy ( ) ) { return false ; } } return true ; }
Delete records for a given category, type, and reference combination

@param   string   $category     Transaction category (royalties, etc)
@param   string   $type         Transaction type (deposit, withdraw, etc)
@param   integer  $referenceid  Reference ID (resource ID, etc)
@param   integer  $uid          User ID
@return  boolean  False if errors, True on success
Delete records for a given category type and reference combination