On Mon, 2002-12-09 at 12:45, Petre Agenbag wrote: > sql,query [snip] > I need to "filter" duplicate entries from my result query, but there's a > twist... [snip] > Where name 1 key1 was obviously a typo, yet, I would ideally want to > filter or flag this through some kind of logic => ( there is already a > key1 associated with a name1, cannot associate key1 with another name!)
Perhaps you can first run a query that corrects the typos? That would make maintaining the logic more easy... e.g. first run a query that changes all 'name x' into the appropriate 'namex', then run another query that checks for duplicates. If you combine these two in one function in PHP you don't even need to call multiple queries. That way you can add other queries for different typos when the need arises... And on a side-note; perhaps you can add some logic to the query that updates the db so these kind of typos are prevented? HTH -- # Mertens Bram "M8ram" <[EMAIL PROTECTED]> Linux User #249103 # # Red Hat Linux 7.3 KDE 3.0.0-10 kernel 2.4.18-3 i686 128MB RAM # # 12:17pm up 2:12, 1 user, load average: 0.20, 0.10, 0.13 # --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php