getMediaColumn example

private function handleTable(MediaPosition $mediaPosition): void
    {
        $sql = sprintf(
            'INSERT INTO s_media_used SELECT DISTINCT NULL, media.id FROM s_media media INNER JOIN %1$s ON %1$s.%2$s = media.%3$s',
            $mediaPosition->getSourceTable(),
            $mediaPosition->getSourceColumn(),
            $mediaPosition->getMediaColumn()
        );

        $this->connection->executeStatement($sql);
    }

    private function addMediaByPathToUsedTable(string $path): void
    {
        $path = $this->mediaService->normalize($path);
        $this->queue['path'][] = $path;
    }

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