Using Flatfile: to write deducted data back. Helpp!!

A

Anonymous

Guest
Abandon this approach. The code, though possible, will quickly become too difficult to maintain, and if you have more than a few users your performance will be awful.

Flat files are okay for storing data that doesn't get changed very much, or very simple data, but if you've got more than one column and/or any appreciable number of rows, you're just asking for trouble.

The solution, of course, is to use a real database: MySQL, PostgreSQL, SQLite. There are plenty of tutorials out there. Google is your friend.
 
If you're determined to use a flat file, you'll be better off using a CSV (comma-separated) or tab-delimited file and then using a package from PHPClasses.org or HotScripts.com to read and write them. No sense in reinventing the wheel.
 
Back
Top