hello i have one mysql and i wan to load some records with where.....
but in some records has duplicate values
example
select all records form some database ...
results ........
id = 1, first_name = jim, mobile = 123456789,
id = 2, first_name = george, mobile = 123456789,
i dont want load the second record because has the same mobile...
the records is too many...
and the duplicates are also many....
any idea ?
not load duplicate criteria from mysql
Moderator: General Moderators
- Bill H
- DevNet Resident
- Posts: 1136
- Joined: Sat Jun 01, 2002 10:16 am
- Location: San Diego CA
- Contact:
Re: not load duplicate criteria from mysql
SELECT FROM (blah, blah) LIMIT 1
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: not load duplicate criteria from mysql
Use the GROUP BY and/or DISTINCT clause.
Re: not load duplicate criteria from mysql
If you're still having a problem, please show us your exact SQL statement, and which field is the one that has duplicate values.