[PHP-DB] Getting all rows of a certain column when grouping?

2003-01-18 Thread Leif K-Brooks
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?

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.



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



Re: [PHP-DB] Getting all rows of a certain column when grouping?

2003-01-18 Thread Jason Wong
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
*/


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