Re: Using two colomns of mysql data as key/value pairs in arrays
| From: | Chris Boget | Date: | Mon, 20 Oct 2003 14:10:45 +0000 |
| Subject: | Re: Using two colomns of mysql data as key/value pairs in arrays | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31166@lists.php.net to get a copy of this message | ||
> % > The original poster actually mentioned an associative array with one
> % > field as the index and another as the value. None of these, just
> % > Ignatius's suggestion, will do the job.
> % Actually, mysql_fetch_assoc() will do quite nicely.
> Really? How? I must be quite confused.
No, actually, I am the one who's confused. I misread the OP's email such
that *_assoc() would do the job.
My bad.
If MySQL had crosstab functionality, that *might* be able to help.
But I still stand by my assertion that *_assoc() is better than *_array() in
almost all circumstances.
Chris