public static function getRecord($itemid=0, $action='', $category='', $created='', $log = '')
	{
		$model = self::all()
			->select('id');

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

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

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

		if ($created)
		{
			$model->whereLike('date', $created . '%');
		}

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

		$row = $model->row();

		return $row->get('id');
	}
public static function getRecord($itemid=0, $action='', $category='', $created='', $log = '')
	{
		$model = self::all()
			->select('id');

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

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

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

		if ($created)
		{
			$model->whereLike('date', $created . '%');
		}

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

		$row = $model->row();

		return $row->get('id');
	}
public static function getRecord ( $ itemid = 0 , $ action = '' , $ category = '' , $ created = '' , $ log = '' ) { $ model = self :: all ( ) -> select ( 'id' ) ; if ( $ category ) { $ model -> whereEquals ( 'category' , $ category ) ; } if ( $ itemid ) { $ model -> whereEquals ( 'itemid' , $ itemid ) ; } if ( $ action ) { $ model -> whereEquals ( 'action' , $ action ) ; } if ( $ created ) { $ model -> whereLike ( 'date' , $ created . '%' ) ; } if ( $ log ) { $ model -> whereEquals ( 'log' , $ log ) ; } $ row = $ model -> row ( ) ; return $ row -> get ( 'id' ) ; }
Get the ID of a record matching the data passed

@param   mixed    $itemid    Integer
@param   string   $action    Transaction type
@param   string   $category  Transaction category
@param   string   $created   Transaction date
@param   string   $log       Transaction log
@return  integer
Get the ID of a record matching the data passed