grouping sorting ordering

2011-04-04 Thread S�ndor Hal�sz
After more fooling around, I found that this yields something ordered by the first field: select REPLACE(eMail, '- ', '') AS Email, IFNULL(foreignKey, '') AS "Foreign Key", "Full Name", "List Membership" from PHPLIST2 AS Z WHERE eMail IS NOT NULL GROUP by REPLACE(eMail, '- ', '') Is this the on

grouping sorting ordering

2011-04-04 Thread S�ndor Hal�sz
I wrote this query, making use of MySQL s permissive 'GROUP BY', for to keep only one record with a given value of 'Email', quite indifferent which record is kept: select REPLACE(eMail, '- ', '') AS Email, IFNULL(foreignKey, '') AS "Foreign Key", "Full Name", "List Membership" from PHPLIST2 AS