-----Original Message-----
From: Fredrik Arild Takle [mailto:[EMAIL PROTECTED] 
Sent: 03 May 2005 17:49
To: php-general@lists.php.net
Subject: [PHP] Check for doubleposts


Hi,

what is the easiest way to check if a person i registered twice in a 
mysql-table. Lets assume that I only check if the last name is in the
table 
more than once. This is in mysql 4.0 (subquery not an option).
-----------
How about 
SELECT lastname, count(lastname) 
FROM table 
GROUP BY lastname
HAVING count(lastname)>1 
----------
Do I have to use arrays and in_array. Or is there a more elegant
solution?

Best regards
Fredrik A. Takle 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, 
Cisco, Sun Microsystems, 3Com

GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 
2000' REGISTERED COMPANY

**********************************************************************

CONFIDENTIALITY NOTICE:

This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.

GENERAL STATEMENT:

Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no 
content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order,  subject to our Terms and Conditions available from 
http://www.gammaglobal.com

E&OE

**********************************************************************
**********************************************************************


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to