Re: SELECT

From: Date: Sun, 11 Dec 2005 01:20:02 +0000
Subject: Re: SELECT
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-40840@lists.php.net to get a copy of this message
I am trying to put together a SELECT syntax. I am querying a response database and I only want to obtain each user's name once even if they have given more than 1 response. $query="SELECT * FROM conversation_table WHERE conversation_reference = $conversation_currently_displayed"; $response_created_by = mysql_result($result,$i,"response_created_by"); My ideal is that if users 1, 2, 4 & 5 are in dialogue with each other the above SELECT $query will only give the results of their identity once with the mysql_request() function
SELECT DISTINCT(user_id) FROM conversation_table WHERE conversation_reference = $conversation_currently_displayed should do it. -philip

« previous php.db (#40840) next »