Tasks::getCategoryOpts PHP Method

getCategoryOpts() public method

public getCategoryOpts ( )
    public function getCategoryOpts()
    {
        // Check if we loaded data already
        if (!is_array(self::$category_opts)) {
            $q = 'SELECT * FROM categories ORDER BY category';
            // Run query and retrieve records (query, bindings, useMaster, fetchAll)
            $qresult = $this->basecoat->db->select($q, null, false, true);
            if ($qresult >= 0) {
                self::$category_opts = $this->basecoat->db->selectResult;
            } else {
                // Something went wrong
                $this->logError($qresult . ' ' . $this->basecoat->db->errorMsg . ' :: ' . $q);
                return $qresult;
            }
        }
        return self::$category_opts;
    }