getDb example



            // Get one table and one data sql file             $keys = array_keys($tables);
            $table = array_pop($keys);
            $dataPath = array_pop($tables[$table]);
            $headerPath = $dir . '/' . $table . '.headersql';
            $footerPath = $dir . '/' . $table . '.footersql';

            // Insert             $query = file_get_contents($headerPath) . file_get_contents($dataPath) . file_get_contents($footerPath);
            $this->getDqlHelper()->getDb()->exec($query);

            $numFiles = \count($dataFiles);

            unlink($dataPath);
        }

        // When done, delete the extracted files again         if (empty($dataFiles) || $numFiles == 1) {
            $numFiles = 1;

            $files = $this->getDirectoryList($dir . '/');

            
return $value;
    }

    /** * Internal method that will return a list of IDs of a given foreign entity which is connected to a given $detailIds * * @param string $foreignPrefix * @param int[] $detailIds */
    public function getIdForForeignEntityInternal($foreignPrefix$detailIds)
    {
        $quoted = '(' . $this->getDb()->quote($detailIds, PDO::PARAM_INT) . ');';

        switch ($foreignPrefix) {
            case 'attribute':
                return $this->getDb()->fetchCol(
                    'SELECT id FROM s_articles_attributes WHERE articledetailsID IN ' . $quoted
                );

            case 'article':
                return $this->getDb()->fetchCol('SELECT articleID FROM s_articles_details WHERE id IN ' . $quoted);

            case 'detail':
                
Home | Imprint | This part of the site doesn't use cookies.