Jump to content

Querying Data that has the same ID


inspireddesign

Recommended Posts

Hello All,

 

Hope everyone had a nice Easter.  My problem is this:

 

I have a large database that has unique ID numbers but some of the information has the same ID.  For example:  In my case I have a table that has client information with a unique ID of say 100.  And I have another table called aircraft which has a field called client_id and airport_id.

 

This client with the unique ID of 100 has more than one aircraft and each of his aircraft in the table 'aircraft' has the client ID of 100.  I would like to extract or query the aircraft for this client in some way that it can be displayed easily.

 

I'm sure you are saying that's easy you just do the following:

 

SELECT *

FROM `aircraft`

WHERE client_id = 100;

 

Well here's my real problem.  I need to take that same data array and segment the data so it's not just a dump of information.  I want the output to be "Aircaft1 Data Chuck",  "Aircaft2 Data Chuck", "Aircaft3 Data Chuck", etc.

 

Can someone give me a hand?

 

Thanks a bunch,

 

Damian

Link to comment
https://forums.phpfreaks.com/topic/153858-querying-data-that-has-the-same-id/
Share on other sites

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.