Forum Moderators: coopster

Message Too Old, No Replies

Using PHP with a flatfile database

         

Marcia

8:53 pm on Jul 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I need a very simple catalog system to insert one photo each and some lines of HTML code within nested tables for a limited number of products. Mostly static text with some variables put in where necessary.

All the catalog scripts out there seem to use MySQL, and I'd rather use a flatfile database. I've decided to attempt writing it myself, but can't find any information on using flat files with PHP.

Does it have to be a separate file, or can it be simply string manipulation calling variables and concatenating? That seems cumbersone - but I can't find a clue how to incorporate flatfiles.

What would be the best way to get this done?

bcolflesh

9:12 pm on Jul 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This might suit your needs:

sourceforge.net/projects/ffdb-php/

Regards,
Brent

akogo

10:30 pm on Jul 10, 2003 (gmt 0)

10+ Year Member



I have less than a year's experience with PHP, but I was able to achieve your objective with PHP arrays. Look up multi dimensional arrays on php.net or elsewhere on the web for your answer. Perhaps what Brent suggested is fine if you like to follow someone else's track... but if you're like me, I prefer to come up with my own way from scratch.

Birdman

10:43 pm on Jul 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello Marcia,

The section on filesystem functions [us4.php.net] in the manual is a good reference.

Birdman

lorax

1:42 am on Jul 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Marcia,
May I ask as to why you'd rather use a flatfile db?

Learning Curve

4:04 pm on Jul 11, 2003 (gmt 0)

10+ Year Member



Marcia, I built a little flat file application last fall. It took me MUCH longer to make than I expected, being a non-programmer. I could have learned a ton of PHP/MySQL in the same amount of time.

I'm learning PHP/MySQL now and I can see why everyone is so high on it. It opens up a whole new world of possibilities.