Jump to content

[SOLVED] Using two different databases to reduce results in PHP


upperbid

Recommended Posts

Say I first generate a list of results of purchases from a specific user from a database showing the product number with all the other data, which I can already do successfully.  For example, results currently are like:

 

Product number, Description, Quantity, Price

7897797, chair, 1, $49.99

8797879, stool, 2, $24.99

6897679, table, 1, $149.99

 

I then need to further limit those results based on criteria from another database which only gives information on the product, such as the manufacturer but does not contain any of the purchase information. Say I wanted to only return the results of the purchases from that buyer that were from a manufacturer called Tom's Wood which would be stored in another database.

 

I can use the product number from the first results since the product number is the common factor in both databases, but I'm not quite sure how to do this second part.  I would like the result to return both parts for the specified criteria (in this case all purchases from the buyer with the specified manufacturer Tom's Wood) together like:

 

Product number, Manufacturer, Description, Quantity, Price

7897797, Tom's Wood, chair, 1, $49.99

8797879, Tom's Wood, stool, 2, $24.99

 

Any suggestions would be appreciated.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.