Re: Re: Quick MySql Question
| From: | John Nichel | Date: | Tue, 22 Oct 2002 00:50:06 +0000 |
| Subject: | Re: Re: Quick MySql Question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120828@lists.php.net to get a copy of this message | ||
You should also think about putting 'make' in it's own table, and using the unique identifier from the make table in your auto table. Not only would it be better data base form, but it would make it easier for you to select all the makes.
Omar wrote:
Try this: SELECT DISTINCT(make) FROM 'table' It'll show only 1 toyota, 1 honda, etc. "Taylor York" <taylor@dreamstargroup.com> escribió en el mensaje news:20021021222348.91182.qmail@pb1.pair.com...Hello, basically, I want a select with no duplicates... I have a table similar to: +----+--------+--------+ | id | model | make | +----+--------+--------+ | 1 | Supra | Toyota | +----+--------+--------+| 2 | Civic | Honda |+----+--------+--------+ | 3 | Celica | Toyota | +----+--------+--------+ | 4 | Accord | Honda | +----+--------+--------+ If I do a " SELECT make FROMtable" I will get 2 toyotas, and 2 hondas, But what I want is just 1 toyota, and 1 honda. Any suggestions?