RE: Help on select distinct or distinctrow?

From: Date: Wed, 01 Nov 2000 16:31:55 +0000
Subject: RE: Help on select distinct or distinctrow?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-23181@lists.php.net to get a copy of this message
Calvin, Try this: SELECT EmpID, JobID, Date FROM XXX GROUP BY EmpID Regards, Jonathan -----Original Message----- From: Wee Chua [mailto:Chua@mail.interclean.com] Sent: Thursday, November 02, 2000 12:11 AM To: MySQL (E-mail); PHP (E-mail) Subject: Help on select distinct or distinctrow? Hi all, If have a result set like this, EmpID JobID Date 1 1 1/1/00 1 2 2/1/00 1 3 3/1/00 2 4 4/1/00 2 5 5/1/00 2 6 6/1/00 2 7 7/1/00 3 8 8/1/00 3 9 9/1/00 how could I get rid of duplicate EmpID instead of showing one like example below, do i have to use select distinct or distinctrow and group by commad in my select statement, what is the syntax for that? EmpID JobID Date 1 1 1/1/00 2 2/1/00 3 3/1/00 2 4 4/1/00 5 5/1/00 6 6/1/00 7 7/1/00 3 8 8/1/00 9 9/1/00 could anyone help, thanks a lot in advance! regards, Calvin -- --------------------------------------------------------------------- Please check "http://www.mysql.com/documentation/manual.php" before posting. To request this thread, e-mail mysql-thread55000@lists.mysql.com To unsubscribe, send a message to: <mysql-unsubscribe-jonathan.chiu=mail.com@lists.mysql.com> If you have a broken mail client that cannot send a message to the above address (Microsoft Outlook), you can use: http://lists.mysql.com/php/unsubscribe.php

« previous php.general (#23181) next »