<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/

class Stories_Model_DbTable_Recentlyviewitems extends Engine_Db_Table
{

	protected $_name = 'stories_recentlyviewitems';
	protected $_rowClass = 'Stories_Model_Recentlyviewitem';

	public function isAlreadyView($params = array())
	{

		return $this->select()
			->from($this->info('name'), array('recentlyviewed_id'))
			->where('owner_id = ?', $params['owner_id'])
			->where('resource_id = ?', $params['resource_id'])
			->query()
			->fetchColumn();
	}
}
