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'm having trouble passing a query like this to the Propel pager as criteria. I was hoping this would work.
$criteria->addSelectColumn('SUBSTRING_INDEX(' . TablePeer::URL . ', \'/\', 3) AS table');
But unfortunately it doesn't. Any ideas how I could pass this using a criteria method?
UPDATE
For those interested, this is what ended up working, thanks!
$criteria->addAsColumn('domain', 'SUBSTRING_INDEX(' . TablePeer::URL . ', \'/\', 3)');
$criteria->addGroupByColumn('domain');