how to mark duplicates value in table view?
Posted: 2022-02-01 05:25
how to mark duplicates or more than 2 times repeating value in table view for certain field, and filter it as same values ?
A place where AppGini users can exchange ideas and help each other.
https://forums.appgini.com:443/phpbb/
https://forums.appgini.com:443/phpbb/viewtopic.php?f=4&t=4595
For avoiding duplicates you should set unique-flag.zkarwinkar wrote: ↑2022-02-01 05:25how to mark duplicates or more than 2 times repeating value in table view for certain field, and filter it as same values ?
is_duplicate
on that table, then do the checks on serverside (SQL+PHP) and update that new field if you detect a duplicate. Having this additional field and having records tagged as "duplicates", in the second step there are many ways for filtering, sorting, searching and highlighting.customers
having a column named email
, this is the SQL command for finding all duplicate emails:Code: Select all
SELECT `email`
FROM `customers`
WHERE `email` IS NOT NULL
group by `email`
having count(*)>1
is_duplicate
= 1 (and all the others = 0).is_duplicate
into a calculated field which automatically updates it's status.Code: Select all
SELECT
(SELECT count(*)>0 FROM customers WHERE A.email = email AND A.id != id)
FROM `customers` as A
WHERE A.id='%ID%'