tomasd Posted May 21, 2007 Share Posted May 21, 2007 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! Quote Link to comment https://forums.phpfreaks.com/topic/52390-solved-advise-needed-on-database-structure/ Share on other sites More sharing options...
AndyB Posted May 21, 2007 Share Posted May 21, 2007 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 ... Quote Link to comment https://forums.phpfreaks.com/topic/52390-solved-advise-needed-on-database-structure/#findComment-258543 Share on other sites More sharing options...
tomasd Posted May 22, 2007 Author Share Posted May 22, 2007 thanks I'll have a go with that then Quote Link to comment https://forums.phpfreaks.com/topic/52390-solved-advise-needed-on-database-structure/#findComment-258860 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.