PDOStatement->execute():191 PHP 8.1.19

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1

/home/filepedia/public_html/framework/database/QBuilder/Traits/QBRead.php:191

179
        if (isset($this->select_cond['limit'])) {
180
            $command .= ' LIMIT ' trim($this->select_cond['limit']);
181
        }
182
183
        $this->select_cond['statement'] = $this->prepare($command);
184
185
        if (isset($this->select_cond['where']['bind_and_param'])) {
186
            foreach ($this->select_cond['where']['bind_and_param'] ?? [] as $key => $value) {
187
                $this->select_cond['statement']->bindValue(sprintf(":%s"str_replace('.'''$key)), $value);
188
            }
189
        }
190
191
        $this->select_cond['statement']->execute();
192
    }
193
194
    public function first()
195
    {
196
        $this->execute_select_command();
197
198
        if (isset($this->select_cond['fetch']) && class_exists($this->select_cond['fetch'])) {
199
            $result $this->select_cond['statement']->fetchObject($this->select_cond['fetch']);
200
        } else {
201
            $result $this->select_cond['statement']->fetch($this->select_cond['fetch'] ?? \PDO::FETCH_OBJ);
202
        }
203
204
        $this->reset_query();