Here is the query I need to run
SELECT REPLACE (REPLACE (SUBSTRING_INDEX (LOWER (table.url), '/', 3), 'www.', ''), 'Http: //', '') AS domain FROM table GROUP BY domain
But I am having trouble passing such a request to the Propel player as criteria. I was hoping this would work.
$ criteria-> addSelectColumn ('SUBSTRING_INDEX ('. TablePeer :: URL. ', \' / \ ', 3) AS table');
But, unfortunately, this is not so. Any ideas how I could convey this using the criteria method?
UPDATE
For those who are interested, this is what ended up working, thanks!
$ criteria-> addAsColumn ('domain', 'SUBSTRING_INDEX ('. TablePeer :: URL. ', \' / \ ', 3)'); $ Criteria-> addGroupByColumn ('domain');
source
share