/**
  * put your comment there...
  * 
  */
 public function getItemsTotal()
 {
     $queryBase = $this->getItemsQuery();
     $select = 'SELECT count(*) Total';
     $query = "{$select}{$queryBase['from']}{$queryBase['where']}";
     // Get items total.
     $dbDriver = new CJTMYSQLQueueDriver($GLOBALS['wpdb']);
     $result = $dbDriver->select($query);
     return array_shift($result)->Total;
 }
        // filter can controller the returned value or customize the query!
        if ($query && empty($resultSet)) {
            $resultSet = $this->wpdb->get_results($query, $returnType);
        }
        return $resultSet;
    }
    /**
     * Put your comments here...
     *
     *
     * @return 
     */
    public function startTransaction()
    {
        $this->addQueue('BEGIN WORK;');
        return $this;
    }
    /**
     * put your comment there...
     * 
     * @param mixed $query
     */
    public function update($query)
    {
        return $this->addQueue($query);
    }
}
// End class.
// Hooking!
CJTMYSQLQueueDriver::define('CJTMYSQLQueueDriver', array('hookType' => CJTWordpressEvents::HOOK_FILTER));