DB_dsql::useExpr PHP Méthode

useExpr() public méthode

Change template of existing query instead of creating new one. If unsure use expr().
public useExpr ( string $expr, array $tags = [] )
$expr string SQL Expression. Don't pass unverified input
$tags array Obsolete, use templates / setCustom()
    public function useExpr($expr, $tags = array())
    {
        foreach ($tags as $key => $value) {
            if ($key[0] == ':') {
                $this->extra_params[$key] = $value;
                continue;
            }
            $this->args['custom'][$key] = $value;
        }
        $this->template = $expr;
        if (!empty($tags)) {
            $this->setCustom($tags);
        }
        $this->output_mode = 'render';
        return $this;
    }