Re: Re: phpmysql(which array function?)
| From: | Marek Kilimajer | Date: | Sat, 08 Nov 2003 13:41:41 +0000 |
| Subject: | Re: Re: phpmysql(which array function?) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-168949@lists.php.net to get a copy of this message | ||
Burhan Khalid wrote:
SELECT * FROM thetable GROUP BY column1; That should work read > http://www.mysql.com/manualSELECT *, GROUP_CONCAT(column2) as column2 FROM thetable GROUP BY column1; But this requires mysql 4.1. If you don't have mysql 4.1, detect in your while loop if column1 is not equal to the previous one, then start a new row.