2

In an attempt to redesign a website, I put this page together by hand. However, there are currently over 100 more shows already that need to be added, and three new shows get added every year.

In the old system, a text document was used as a makeshift 'database'; it stored data about each show, with shows separated by '#' and data fields separated with ']'. Here's an excerpt:

#The Whorl of the Leaves]WhorlOfTheLeaves]3]F]167
#Aladdin]Aladdin]8]N]0
#A Christmas Carol]XmasCarol84-]7]N]0
#The Feral Child]FeralChild]7]N]118
#Camelot]Camelot]11]N]169

A PHP script was then used to extract the information about each show and make the page seen here.

I'm sure a script could be used to put together a page such as the one shown above, but it seems like there should be a better system than a text document to store the information.

My question is: if the text document 'database' is working, should I bother changing it? Is there a better way to organize the information about each show?

FluffyLlemon
  • 135
  • 1
  • 5

3 Answers3

5

SQLite would be prefect for you. It's a tiny database that requires no configuration or setup - yet comes built into most PHP installs.

Just use PDO and your good.

$db = new PDO('sqlite:/path/to/here/mydb.sq3');

$db->query('SELECT * FROM shows');
Xeoncross
  • 55,620
  • 80
  • 262
  • 364
1

Yep, there are a ton of "better" ways of doing this. But if you're happy with it and it works, why change it?

Paul Dessert
  • 6,363
  • 8
  • 47
  • 74
-1

You could save yourself a lot of trouble by using a content management system such as drupal.

Finbarr
  • 31,350
  • 13
  • 63
  • 94