Re: Getting all rows of a certain column when grouping?

From: Date: Sat, 18 Jan 2003 16:30:13 +0000
Subject: Re: Getting all rows of a certain column when grouping?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-24931@lists.php.net to get a copy of this message
On Sunday 19 January 2003 00:00, Leif K-Brooks wrote: > I have a table that stores smileys users can use. I'm trying to make a > > page that lists them in an HTML table something like: > |----------------| > | Smiley | Image | > |--------|-------| > | > |:), :-) | IMAGE | > |:(, :-( | IMAGE | > > ------------------ > > I could use a query something like: > > select * from smileys group by image > > But that would only return one of the possible things the user can type > to make that smiley. Is there another way? select * from smileys order by image Then do some simple manipulation when outputting so that smileys associated with the same image are displayed on the same row. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* I'm not the person your mother warned you about... her imagination isn't that good. -- Amy Gorin */

« previous php.db (#24931) next »