note 39823 added to function.mysql-query
| From: | JohannEckert at rn2 dot php dot net | Date: | Wed, 11 Feb 2004 22:08:32 +0000 |
| Subject: | note 39823 added to function.mysql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-65028@lists.php.net to get a copy of this message | ||
To find double entries in a table:
SELECT db1.*
FROM tbl_data db1, tbl_data k2
WHERE db1.id <> db2.id
AND db1.name = db2.name
db1.id must be the PK
db1.name must be the fields that should be verified as double entries.
(I'm not sure wether the code is correct but in my case it works)
Johann
----
Manual Page -- http://www.php.net/manual/en/function.mysql-query.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39823
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39823&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39823&report=yes
Search -- http://master.php.net/manage/user-notes.php