Part of the MySQL query that I'm trying to convert to pgSQL :
LEFT JOIN {$_TABLES['comments']} c ON c.sid = concat('fileid_' ,a.lid )
This got messy since it's concatenating a string with a column(a.lid), which isn't supported by the SQL 92 || operator(important!). Any idea's how to redo this part of the query for pgSQL?