PHP-PDB: Memo Pad Files

Main Page
General
Basic Use
Custom Formats
Extra Info
Credits
Modules
Address Book
Datebook
DOC
List
Memo Pad
MobileDB
SmallBASIC
Todo
Examples
Bookmark Test
Spade
Twister
SourceForge
Download
Project Page
Mailing Lists
Bug Reporting

Memo Pad files are extremely easy to modify, as you will see below.

If you install a database created with this class onto your handheld, it will overwrite the one that already exists on your handheld. This is because a new database will have the same name as the current database on your handheld and you can't change the name of the database otherwise the application won't work. This is obviously irritating -- please keep this in mind. An ideal use for this PHP class would be for talking to a conduit, where the conduit would upload the current data, the server would parse it and add/modify/delete entries with this class, the server would send the modified file back to the conduit, and the conduit would replace the device's database with the modified one.

Including into your program

include 'php-pdb.inc';
include 'modules/memo.inc';

Creating a new database

Memo pad files already have a specified name, type, and creator ID. You don't need to worry about anything.

$DB = new PalmMemo();

Writing the database

This is the same as the base class. See Basic Use for more information.

Loading the database

This works just like loading files with the base class. Please see Basic Use for further information.

Category Support and Record Attributes

Memos support categories. This is the same as the base class. Please see Basic Use for more information and examples.

Other functions

SetText($text, $record = false)
If the $record number is specified, it sets the record to $text.
If $record number is not specified, it just sets the current memo record to $text.
$text is limited to 4095 characters and will be automatically trimmed if it is too long.
GetText($record = false)
Returns the text of the memo record specified, if $record was set.
Otherwise, it returns the text of the current record.

Example

$pdb = new PalmMemo();
$pdb->GoToRecord(0);
$pdb->SetText("This is the first memo");
$pdb->SetText("This is the second memo", 1);
$pdb->GoToRecord(2);
$pdb->SetText("This is the third memo");
$pdb->DownloadPDB("MemoDB.pdb");


SourceForge Logo ©opyright 2001, Tyler Akins ()
All names, trademarks, etc. are property of their respective owners.