Helpful Information
 
 
Category: Other Databases
Customising PHP script to work with Flatfile

Hey
I have this PHP script that consists of these files:
login.php
db_connect.php
register.php

It uses a MySQL database as it's database but I only have one database, and I am using that for my Forum so I can't use that.
How easy would it be to customise it to use flatfile as it's database?

Regards, and thanks in advance

-Jamie

SQLite (http://www.sqlite.org/)?

It's likely to be tricky. Every time your script uses any SQL, it would need to be modified for work with the flat-file. It could be done, and it you've got a nice abstrtaction layer, it'd be relatively easy. But it's more likely that you won't and it'll be difficult.

A simpler approach would be to run this script in the same database instance as your forum. You might been to mess around with table names - I generally try and prefix all table names with a short application identifier (or two), which makes it fairly easy to run multiple applications off a single database instance.

ok cheers
im going to have a play around with it this evening to see if i can get them both to run on the same database
-Jamie










privacy (GDPR)