Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.