Is there a way to do a JOIN type of SELECT query where you are pulling data from 3 tables, but all the data gets returned as one row or one array? Right now I am trying to do a SELECT from 3 tables and I am getting results like this:
(PART NUMBER, DESCRIPTION, PRICE, DISCOUNTED_PRICE, URL, IMAGE_URL)
TXX-101, Widget, 59.00, /index.php
TXX-101, Widget, 59.00, /image.jpg
TXX-101, Widget, 55.00, /index.php
TXX-101, Widget, 55.00, /image.jpg
When I really want to get is a single row/array like this:
TXX-101, Widget, 59.00, 55.00, /index.php, /image.jpg
The root of the problem is that in my primary table the id(primary key) has always one row. In the other tables the id(foreign key) has 2 rows. This problem may be a result of the database's stucture being wrong, but I am working off of a MySQL database I am allowed to change minimally if at all.
P.S. Running MySQL 4.0.17








Bookmarks