protected function getSqlQuery($name, array $vars = array())
    {
        $sql = $this->sqlQueries[$name];
        $vars = array_merge(array('tablename' => $this->tableName), $vars);
        foreach ($vars as $k => $v) {
            $sql = str_replace("%$k%", $v, $sql);
        }
        return $sql;
    }