RE: [PHP-DB] mysql related question

From: Date: Tue, 29 Aug 2000 21:39:03 +0000
Subject: RE: [PHP-DB] mysql related question
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-2457@lists.php.net to get a copy of this message
I don't know how your database is structured, but you may be able to use SELECT DISTINCT ... this will return only unique values in the dataset, eliminating the need to remove duplicates in your PHP code. SELECT DISTINCT a FROM b -----Original Message----- From: kukk@design.interest.ee [mailto:kukk@design.interest.ee] Sent: Tuesday, August 29, 2000 1:07 PM To: php-db@lists.php.net Subject: [PHP-DB] mysql related question Hi. Im very new in this list right now, but I need help! :-) I am dealing with a mysql database and I would like to get some information from a single field. I do it with mysql_fetch_array($sql); so I think I will get an array from this. Now what I need is to remove any possible duplicate values from this array. I tried to do it width array_unique(); but I get an error smth about wrong data type :-( Has anyone dealt with this kind of a problem or can someone let me know how can I remove duplicate values from an SQl result? thanks in advance, with best regards ___________________ Erki Kukk erki@kukk.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#2457) next »