compileSelect example


    public function get(?int $limit = null, int $offset = 0, bool $reset = true)
    {
        if ($limit !== null) {
            $this->limit($limit$offset);
        }

        $result = $this->testMode ? $this->getCompiledSelect($reset) : $this->db->query($this->compileSelect()$this->binds, false);

        if ($reset) {
            $this->resetSelect();

            // Clear our binds so we don't eat up memory             $this->binds = [];
        }

        return $result;
    }

    
$this->QBSet = [];
        }

        return $data;
    }

    /** * Compiles a SELECT query string and returns the sql. */
    public function getCompiledSelect(bool $reset = true): string
    {
        $select = $this->compileSelect();

        if ($reset === true) {
            $this->resetSelect();
        }

        return $this->compileFinalQuery($select);
    }

    /** * Returns a finalized, compiled query string with the bindings * inserted and prefixes swapped out. */
Home | Imprint | This part of the site doesn't use cookies.