How to display my results?
| From: | Charles Kline | Date: | Sat, 08 Mar 2003 05:18:25 +0000 |
| Subject: | How to display my results? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-4105@lists.php.net to get a copy of this message | ||
I have been messing with this query ALL DAY. I have finally gotten MySQL to return the results I am looking for (in phpMyAdmin) but I am using PEAR DB on my pages and I can't figure out how to get to the data I need from this query.
Here is the query:
SELECT
tbl_funding.area_1,
areas1.area_name,
tbl_funding.area_2,
areas2.area_name
FROM
tbl_funding
LEFT JOIN tbl_dra areas1 ON tbl_funding.area_1 = areas1.id
LEFT JOIN tbl_dra areas2 ON tbl_funding.area_2 = areas2.id
I get this returned when I try this in phpMyAdmin:
area_1 area area_2 area
4 Health Services and Systems 5 Mental Illness 3 Chronic Diseases 0 NULL 1 Acute and Traumatic Injury 2 Aging and AgeSo, there are two columns returned with the name area. I have no idea what to do with this - I am trying to display the names that are in the area fields. Any clue? Thanks Charles