joinLeft example



        $filters = [];
        foreach ($filterParams as $singleFilter) {
            $filters[$singleFilter['property']] = $singleFilter['value'];
        }

        $secondStmt = $this->database
            ->select()
            ->from(['s1' => 's_core_snippets']);

        $secondStmt->joinLeft(
            ['s2' => 's_core_snippets'],
            "s1.namespace = s2.namespace AND s1.name = s2.name AND s2.localeId = $localeId AND s2.shopId = $shopId"
        );

        $secondStmt->reset('columns');
        $secondStmt->columns([
            's2.id',
            's1.namespace',
            's1.name',
            's2.value',
            's1.value as defaultValue',
            
Home | Imprint | This part of the site doesn't use cookies.