From d1e0586b346e2d7d7c0e88de61da0e954f68a3ed Mon Sep 17 00:00:00 2001 From: wainstead Date: Tue, 20 Jun 2000 02:29:18 +0000 Subject: [PATCH] Added a description of the primary data structure, $pagehash. Each field of the hash and the data type it contains is described. git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@73 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- DBLIB.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/DBLIB.txt b/DBLIB.txt index a68383227..e03dcfe62 100644 --- a/DBLIB.txt +++ b/DBLIB.txt @@ -1,4 +1,4 @@ -$Id: DBLIB.txt,v 1.2 2000-06-09 10:17:42 ahollosi Exp $ +$Id: DBLIB.txt,v 1.3 2000-06-20 02:29:18 wainstead Exp $ This is a description of the database interface for PhpWiki. Regardless of what kind of data store is used (RDBMS, DBM files, flat text files) @@ -18,6 +18,21 @@ A few notes: the IP address or host name of the previous author and so on. See the source code for the full listing. +* The data structure. This is commonly named $pagehash in the source + code; it's an associative array with values that are integers, + strings and arrays (i.e. a heterogenous data structure). Here's a + current description: + + $pagehash = { + author => string, + content => array (where each element is a line of the page), + created => integer (a number in Unix time since the Epoch), + flags => string, + lastmodified => integer (Unix time), + pagename => string, + version => integer, + refs => array (where each element is a reference) + }; OpenDataBase($dbname) takes: a string, the name of the database -- 2.45.0