From 62183b1fb1662fb71ddd1b9cfb9d6678f29139fb Mon Sep 17 00:00:00 2001 From: wainstead Date: Fri, 30 Jun 2000 00:44:23 +0000 Subject: [PATCH] Documented the four new functions IncreaseHitCount, GetHitCount, InitMostPopular, and MostPopularNextMatch. git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@132 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- DBLIB.txt | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/DBLIB.txt b/DBLIB.txt index 873664b06..5b4dff090 100644 --- a/DBLIB.txt +++ b/DBLIB.txt @@ -1,4 +1,4 @@ -$Id: DBLIB.txt,v 1.5 2000-06-29 03:08:37 wainstead Exp $ +$Id: DBLIB.txt,v 1.6 2000-06-30 00:44:23 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) @@ -34,6 +34,8 @@ A few notes: refs => array (where each element is a reference) }; +The functions are: + OpenDataBase($dbname) takes: a string, the name of the database returns: a reference to the database (a handle) @@ -41,7 +43,8 @@ A few notes: CloseDataBase($dbi) takes: a reference to the database (handle) - returns: the value of the close + returns: the value of the close. For databases with persistent + connections, this doesn't return anything. RetrievePage($dbi, $pagename) @@ -87,3 +90,25 @@ A few notes: 'name' -- contains the page name 'hash' -- contains the hash of the page data (advances $pos to next result field as well) + + + IncreaseHitCount($dbi, $pagename) + takes: db reference, string (name of a page) + returns: nothing (MySQL implementation returns the last result + set but it is not used by the caller) + + + GetHitCount($dbi, $pagename) + takes: db reference, string (page name) + returns: an integer, the number of hits the page has received + + + InitMostPopular($dbi, $limit) + takes: a db reference and an integer, which is the limit of the + number of pages you want returned. + returns: the result set from the query + + + MostPopularNextMatch($dbi, $res) + takes: db reference, the result set returned by InitMostPopular + returns: the next row from the result set, as a PHP array type -- 2.45.0