Revision [2315]

This is an old revision of WikkaCore made by NilsLindenberg on 2004-11-18 13:17:12.

 

HelpInfo Wikka Documentation

Wikka Core - the structure of Wikka.php

Wikka.php is the main file of WikkaWiki. To understand, how Wikka works it is necessary to understand this file.

The functions

The functions of Wikka.php in alphabetical order.

CheckMySQLVersion
checks if the version-number of MySQL is at least equal or higher then the version-number given to the function
class:wakka
parameters: $major, $minor, $subminor (contain a version-number in the form of maior.minor.subminorsubminor, i.e. 4.1.00)
uses
class variables: -
local variables: $row, $match, $msqyl_major, $mysql_minor, $ mysql_subminor
is used by
functions:
comments:

LoadAll
sends a MySQL-query to Query, puts the result in an array and frees the memory with the results of the query
class: Wakka
parameters: $query (a MySQL query)
uses
class variables: -
local variables: $data (array with every result of the query in one field), $r (stores the result of the query), $row (temporary stores one result of the query)
config options: -
is used by
functions: LoadSingle, ?
comments:

LoadSingle
sends a MySQL-query to LoadAll and returns the first result of the results returned from LoadAll
class: Wakka
paramters: $query (a MySQL query)
uses
functions: LoadAll
class variables: -
local variables: $data (array with every result of the query in one field),
config options: -
is used by
functions: ?
comments:
If all you need is a single result this is a highly inefficient way of getting it; a sepaarte query would be more efficicient. -- JavaWoman

Query
Query sends a MySQL-query to MySQL, returns the result and (optional) infos on time and query.
class: Wakka
parameters: $query (a MySQL query)
uses
class variables: $dblink (contains the connection to the database), queryLog (array with $query and $time)
local variables: $start, (starting time of the query) $time (time MySQL needed for executing the query)
config options: "sql_debugging" (if set to "1", queryLog is set)
is used by
functions: LoadAll
comments:

Wakka
The constructor for a Wakka object. Is called once when adding a new Wakka object and is used for initial purposes
class: Wakka
parameters: $config (an array with the ConfigurationOptions config options of Wikka)
uses
global variables: WAKKA_VERSION (constant with the version of Wikka)
class variables: $config (an array with the ConfigurationOptions config options of Wikka), dblink (contains the connection to the database), VERSION (the version of Wikka),
local variables: -
config options: "mysql_database", "mysql_host", "mysql_password", "mqsql_user" (all for testting access to the database)
is used by
is called once when adding a new Wakka object
comments:
what does the @ before mysql commands do?
mysql_connect is deprecated.
@ Suppresses error messages; not a good idea gererally, better to take care to code in such a way that no errors, warnings or even notices will be produced. -- JavaWoman


CategoryDocumentation
There are 6 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki