Page 1 of 1

HolidayQuery additional arguments

Posted: Sat May 14, 2016 3:33 am
by magallo
Hi this is a continuation of the post here:
http://forum.cmsmadesimple.org/viewtopi ... =6&t=74043
It's locked.

Do you happen to know how I could pass arguments to the

Code: Select all

public function execute()
{
if( !is_null($this->_rs) ) return;
$sql = 'SELECT SQL_CALC_FOUND_ROWS H.*
FROM '.CMS_DB_PREFIX.'mod_holidays H ORDER BY the_date DESC';
$db = \cms_utils::get_db();
$this->_rs = $db->SelectLimit($sql,$this->_limit,$this->_offset);
IF( $db->ErrorMsg() ) throw new \CmsSQLErrorException($db->sql.' -- '.$db->ErrorMsg());
$this->_totalmatchingrows = $db->GetOne('SELECT FOUND_ROWS()');
}
I'd like to add some WHERE conditions to the query.
Thanks

[SOLVED] HolidayQuery additional arguments

Posted: Thu May 26, 2016 5:43 pm
by magallo
fount it:

$query = new HolidayQuery(array('published'=>1));