phpDocumentor db
[ class tree: db ] [ index: db ] [ all elements ]

Class: DatabaseCommon

Source Location: /myphp-1.9/myphp-1.9-db/html/mysql/DatabaseCommon.php

Class DatabaseCommon

Class Overview

Common functions for the different database calls

  1. Usage:
  2. $database = new DatabaseCommon();
  3. $database->open();
  4. $database->set($attribute,$value);
  5. :
  6. print $database->getError();
  7. $database->freeResult();
  8. $database->close();

Located in /myphp-1.9/myphp-1.9-db/html/mysql/DatabaseCommon.php [line 36]

Object
   |
   --DatabaseCommon

Properties

Methods

[ Top ]
Direct descendents
Child Class Description
Database The interface towards the mysql database

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Object

Object::$cachefile
Object::$html
Object::$sql

Inherited From Object

Object::Object()
Constructor
Object::addHtml()
Add the current html to the SourceCode object
Object::getCacheFileName()
Returns the name of the cache file name
Object::getClassName()
Returns the name of the instanciated class
Object::getHtml()
Returns the html for the element
Object::getMsg()
Get the formatted message and debug level and Log to file ?
Object::save()
Save the SQL cache file
Object::setCacheFileName()
Set the path/name of the cache file
Object::toString()
Returns the information for this class
Object::write()
Write the content to the file opened by fp

[ Top ]
Property Summary
object   $connection  
object   $result  

[ Top ]
Method Summary
DatabaseCommon   DatabaseCommon()   Constructor
boolean   close()   Close the connection to the database
boolean   freeResult()   Free the resources
String   getError()   Get the error message
boolean   open()   Connect to the host, and select the database to use
void   set()   Set the named attribute of a class as: $this->key = $value

[ Top ]
Properties
object   $connection = NULL [line 40]

[ Top ]
object   $result = NULL [line 45]

[ Top ]
Methods
Constructor DatabaseCommon  [line 50]

  DatabaseCommon DatabaseCommon( )

Constructor



[ Top ]
close  [line 124]

  boolean close( )

Close the connection to the database


API Tags:
Return:  Returns TRUE on success or FALSE on failure


[ Top ]
freeResult  [line 84]

  boolean freeResult( )

Free the resources


API Tags:
Return:  Returns TRUE on success or FALSE on failure


[ Top ]
getError  [line 98]

  String getError( )

Get the error message


API Tags:
Return:  The resulting error message from the last mysql call


[ Top ]
open  [line 106]

  boolean open( )

Connect to the host, and select the database to use


API Tags:
Return:  Returns TRUE on success or FALSE (or die)


[ Top ]
set  [line 64]

  void set( String $attribute, String $value  )

Set the named attribute of a class as: $this->key = $value

Display an error message and exit, If not a known attribute i.e. You MUST define the attribute at class scope as ... var $myattr='';

Parameters:
String   $attribute:  The attribute to set
String   $value:  The value of the attribute


[ Top ]

Documentation generated on Thu, 22 Dec 2005 17:05:23 +0100 by phpDocumentor 1.3.0RC3