Jump to content

[SOLVED] advise needed on database structure


tomasd

Recommended Posts

Hi,

With a huge help from MadTechie I've managed to query and save flight ticket data from ryanair (http://en.wikipedia.org/wiki/Ryanair).

My next challenge is to make some sense out of this data.

I'm querying flight prices to few destinations for $i days on a daily basis. I'm facing a challenge with days where there is more than one flight therefore there is more than one price. How do I go about saving such scattered info where sometimes I'm getting 1 result and sometimes 10? How do I query database later on?

Here's what I'm getting after executing following function:

ryanair(STN,MJV,100);

20070522 79.99
20070522 79.99
20070523 79.99
20070523 79.99
20070524 99.99
20070524 99.99
20070525 139.99
20070525 129.99
20070526 159.99
20070527 99.99
20070527 99.99

As you may have noticed there's only one price for 20070526, so this is the problems I'm running in... :(

 

Any advice is much appreciated!

 

Link to comment
Share on other sites

Why can't you put all the results into the database. What difference does it make whether you have one result or more for any particular day?

 

SELECT * WHERE flight_date = '$whatever' will return ALL results matching a particular day. Loop through the results ...

Link to comment
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.