Re: Using two colomns of mysql data as key/value pairs in arrays
| From: | CPT John W. Holmes | Date: | Mon, 20 Oct 2003 15:41:34 +0000 |
| Subject: | Re: Using two colomns of mysql data as key/value pairs in arrays | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31190@lists.php.net to get a copy of this message | ||
From: "Chris Boget" <chris@wild.net>
> > From: "Chris Boget" <chris@wild.net>
> > > My bad.
> > > If MySQL had crosstab functionality, that *might* be able to help.
> > A "crosstab" is just a specifically formatted query, of which MySQL is
> > certainly capable of handling. I've done them in the past, but maybe
you're
> > thinking of something more complex. Either way, not sure it would help
or be
> > worth it for this (dead) issue. :)
>
> Then I'm not calling it the right thing... just the name of the type of
query that
> was told. The kind of query I'm talking about is the one that rotates the
result
> set from tall to wide. Basically doing exactly what the OP had asked for.
If
> that kind of query isn't called a 'crosstab' query, I'm not sure what the
name is.
> I know that mysql doesn't support it but PG does (I'm just starting to
learn PG).
I see. I've always heard it referred to as a "pivot table", or something
along those lines.
Great crosstab article/story:
http://www.devshed.com/Server_Side/MySQL/MySQLWiz/page1.html
---John Holmes...