[PHP-DB] mysql - SELECT DISTINCT problem

2004-05-08 Thread mariuspa
Hello,

I use SELECT DISTINCT tip, marca, model FROM modele to select
records without duplicates on the field tip. This works ok, BUT if I
use SELECT DISTINCT tip, marca, model, id FROM... (id is
auto_increment and is the table's primary key) my query won't produce
any result. ANyone has a clue? Thank you!

Best regards,
Marius Panaitescu

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



Re: [PHP-DB] mysql - SELECT DISTINCT problem

2004-05-08 Thread Daniel Clark
Very odd.  I would think it would return every record seeing as the auto_increment ID 
field is different for every record.


I use SELECT DISTINCT tip, marca, model FROM modele to select
records without duplicates on the field tip. This works ok, BUT if I
use SELECT DISTINCT tip, marca, model, id FROM... (id is
auto_increment and is the table's primary key) my query won't produce
any result. ANyone has a clue? Thank you!

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



Re[2]: [PHP-DB] mysql - SELECT DISTINCT problem

2004-05-08 Thread mariuspa
This wouldn't be posible either, because the argument for Distinct
is tip, so other fields will be ignored. But simply it can't retrieve
id. If i want to retrieve it also, it returns zero fields. Thank you
anyway.

Regards,
Marius Panaitescu

DC Very odd.  I would think it would return every record seeing
DC as the auto_increment ID field is different for every record.


I use SELECT DISTINCT tip, marca, model FROM modele to select
records without duplicates on the field tip. This works ok, BUT if I
use SELECT DISTINCT tip, marca, model, id FROM... (id is
auto_increment and is the table's primary key) my query won't produce
any result. ANyone has a clue? Thank you!




-- 
Best regards,
 mariuspamailto:[EMAIL PROTECTED]

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