Class MonkeyDatabase

Description

Located in /Monkey/MonkeyDatabase.php (line 3)

MonkeyList
   |
   --MonkeyStack
      |
      --MonkeyDatabase
Variable Summary
Method Summary
static MonkeyDatabase Create (string $host, string $username, string $password, string $dbname)
static MonkeyDatabase Instance ([ $host = ''], [ $username = ''], [ $password = ''], [ $dbname = ''])
bool CreateConnection (string $host, string $username, string $password, string $dbname)
mysql_query Get ([int $index = 0])
void GetQuery ([int $index = 0])
array GetResults ([int $index = 0])
int GetRowCount ([int $index = 0])
bool IsEmptyResult ([int $index = 0])
bool IsMalformedQuery ([int $index = 0])
array Query (string $query, [ $returnResults = true])
Variables
static mixed $Instance (line 10)
  • access: public
mixed $_cachedResults = array() (line 7)
  • access: protected
mixed $_databaseConnection (line 5)
  • access: protected
mixed $_databaseSelected (line 6)
  • access: protected
mixed $_queries = array() (line 8)
  • access: protected

Inherited Variables

Inherited from MonkeyList

MonkeyList::$_list
Methods
static method Create (line 73)

Returns a new MonkeyDatabase with a database connection

static MonkeyDatabase Create (string $host, string $username, string $password, string $dbname)
  • string $host
  • string $username
  • string $password
  • string $dbname
static method Instance (line 17)

Return singleton instance of class

  • access: public
static MonkeyDatabase Instance ([ $host = ''], [ $username = ''], [ $password = ''], [ $dbname = ''])
  • $host
  • $username
  • $password
  • $dbname
CreateConnection (line 47)

Attempts to connect to the database

  • access: public
bool CreateConnection (string $host, string $username, string $password, string $dbname)
  • string $host
  • string $username
  • string $password
  • string $dbname
Get (line 31)

Returns the query statement at $index

mysql_query Get ([int $index = 0])
  • int $index

Redefinition of:
MonkeyStack::Get()
Returns the item at the stack index
GetQuery (line 173)

Alias of Get, see Get for more information

void GetQuery ([int $index = 0])
  • int $index
GetResults (line 130)

Returns the result from a stored query

  • return: string
  • access: public
array GetResults ([int $index = 0])
  • int $index
GetRowCount (line 184)

Returns the number of rows for the given query

  • access: public
int GetRowCount ([int $index = 0])
  • int $index
IsEmptyResult (line 161)

Returns true if empty result set.

  • access: public
bool IsEmptyResult ([int $index = 0])
  • int $index
IsMalformedQuery (line 116)

Returns true or false on whether or not the input query was malformed

  • access: public
bool IsMalformedQuery ([int $index = 0])
  • int $index
Query (line 89)

Will perform a query and return the results

  • return: string
  • access: public
array Query (string $query, [ $returnResults = true])
  • string $query
  • $returnResults

Inherited Methods

Inherited From MonkeyStack

MonkeyStack::Get()
MonkeyStack::Pop()
MonkeyStack::Push()
MonkeyStack::Set()

Inherited From MonkeyList

MonkeyList::__construct()
MonkeyList::AddFirst()
MonkeyList::AddLast()
MonkeyList::Backwards()
MonkeyList::Clear()
MonkeyList::Count()
MonkeyList::First()
MonkeyList::GetDebug()
MonkeyList::IsEmpty()
MonkeyList::Last()
MonkeyList::Objects()
MonkeyList::RemoveFirst()
MonkeyList::RemoveLast()

Documentation generated on Sun, 12 Feb 2012 04:03:23 -0800 by phpDocumentor 1.4.1