* Andrew Wilson 
> Hi guys,
> I was wondering if anyone knew of a paramter that can be put on 
> the end of a
> select statement when querying a table which only pulled out one unique
> record based on a field.

... LIMIT 1

> I.e
> If i had a drink database and in it were 10 cokes 10 fantas 10 
> pepsi's what
> select statement would i need to pull out 1 coke,1 fanta,1 pepsi .

That would be three records, not one... DISTINCT is probably what you need:

SELECT DISTINCT drinkname FROM drinktable

<URL: http://www.mysql.com/doc/en/SELECT.html >

> Thanks for your help, a virtual beer to whoever answers my question :) 

Cheers!

-- 
Roger
*burp*

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to