Jump to content

Archived

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

stinhambo

Retrieving some tabular data from a flat file

Recommended Posts

Hi there,

I am working on a tourism based website. They run tours with varying times based on the month of the year.

So basically I need to create a flat file with various timetables (about 7) which will hold the month and about 4 times of the day - Here is an example of one of the timetables -

November    10.00am
                  12.00pm
                  14.00pm
                  16.00pm

I want to be able to retrieve the timetable from a flat file based on the server date so if the SERVER date is November then the timetable above will be pulled and entered into a table.

I've had a look at serialisation and fopen but I can't quite get my head around it..

Thanks for any help in advance!

Share this post


Link to post
Share on other sites
Any reason why your not using a database?

Share this post


Link to post
Share on other sites
[quote author=thorpe link=topic=99465.msg391695#msg391695 date=1152062007]
Any reason why your not using a database?
[/quote]

Seems a bit overkill to set up a MySQL database just to store something so simple or is it?

Share this post


Link to post
Share on other sites
It might be overkill right now, but what if later you wanted to add more data, atleast in MySQL you can easily upgrade your tables to hold more data without messing with too much. Also MySQL is a LOT easier then messing around with flat files...IMO.

-Chris

Share this post


Link to post
Share on other sites
Databases are made for querying data. In the long run, if you want to sort, then a db is probably a better option. MySql overkill? Maybe use sqlite?

Share this post


Link to post
Share on other sites

×

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.