XTFD : Project Unleashed

XTFD or my databasing service…

X-tended Text File Databasing

It is a system of functions that allow one to bring the power of table elements into your text files through php or Flash MX…

The only problem this has right now is… File permissions… The person who wnats this on their site must set the file permissions for the xtfd directory to write enabled… Most servers make this Non-Write Enabled for default… But I’ve never had any problems with people making killer “txt” documents before… :slight_smile:

Download the zip file I have below and follow the Read Me directions located in it… I will also give you the low down on how to use the functions in your php pages (FLash MX support not included yet…)

Quick FAQS

Q : How do I use the files installed?
A : If you wnat to use any of the functions included with this… You need to include them into the php page you wish to use them in… Use this line of code to do so…


<?php

include_once("xtfd/xtfd.inc");

?>

This will include your new xtfd fucntions in your php file… Allowing you to use the new functions…

Q : What are the new functions and what do they do?!
A : Well Here’s a nice little list for you…

xtfd_open(database) : opens a database you have already created. Returns true or false depending on if the database was successfully loaded or not.

xtfd_close(database) : closes a database you have already openeed… Returns true or false.

xtfd_delete(database) : deletes a database you have already created. Returns true or false.

xtfd_create(database) : creates abrand spanking new database for you to work with… Returns true or false.

xtfd_rename(database, newname) : renames a database you already have set up to the newname you specify. Returns true or false.

xtfd_copy(database, copyname) : copies a database you already have and names it the copyname… Returns true or false.

xtfd_update(database) : updates the current database with new information you might have changed… Typically does not need to be used unless you change variables directly… Returns true or false.

xtfd_getField(row, column) : Goes to row number and column number to get the specified field you picked out. Returns that field if successful…

xtfd_setField(row, column, data) : Goes to ro number and column number and inputs the data you specified into that field. Returns true or false.

xtfd_addRow() : Adds a row to the currently opened database allowing for more data to be entered. Returns true or false.

xtfd_addCol() : Adds a column to the currently opned database allowing for more data to be entered. Returns true or false.

Q : Okay… So how would I say… Create a new database with a table that’s 2 x 2?
A : Easily… Like such…


if(xtfd_create("newDatabase"))
{
   if(xtfd_open("newDatabase"))
   {
      xtfd_addRow();
      xtfd_addRow();
      xtfd_addCol();
      xtfd_addCol();
      xtfd_setField(0,0, "Monkey");
      xtfd_setField(0,1, "Ape");
      xtfd_setField(1,0, "Snake");
      xtfd_setField(1,1, "Snakemonkey");
   }
}

Now… Bear in mind… 0,0 would be just like saying Row 1 Col 1…

Now… I hope you guys can udnerstand it… if you need anymore help… Look in the read me or ask the question here…