sql 
[ doc home ] [ class tree: sql ] [ index: sql ] [ all elements ]

Class: IsterSqlDriverMysql

Source Location: /IsterSqlDriverMysql.php

Class Overview

IsterObject
   |
   --IsterSqlDriver
      |
      --IsterSqlDriverMysql

The MySQL driver of the package.


Author(s): Ingo Schramm   

Copyright: Copyright (c) 2005 Ister.ORG Ingo Schramm

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: IsterSqlDriver

IsterSqlDriver::IsterSqlDriver()
Constructor
IsterSqlDriver::getConnection()
Return the current connection parameters.
IsterSqlDriver::getLink()
Return the current connection resource.
IsterSqlDriver::setConnection()
Setup the connection.

Class: IsterObject

IsterObject::IsterObject()
Constructor
IsterObject::abstractMethodError()
Report attempt to call an abstract method.
IsterObject::addLogger()
Add an IsterLogger to process log messages.
IsterObject::deleteLogger()
Delete an already registered IsterLogger.
IsterObject::getLoggerNames()
Fetch the names of all currently registered IsterLoggers.
IsterObject::getMem()
Return maximum amount of memory an application has allocated at this point.
IsterObject::log()
Trigger a log message.
IsterObject::passPHPmessage()
Catch PHP E_WARNING and E_NOTICE messages.
IsterObject::serialize()
Serialize the object.
IsterObject::setLogLocal()
Set logging local for the current object.
IsterObject::setupLogger()
Setup a logger.
IsterObject::triggerError()
Alias for log();
IsterObject::unserialize()
Unserialize the object.
IsterObject::__sleep()
Executed prior to serialize().
IsterObject::__wakeup()
Executed prior to unserialize().

Class Details

The MySQL driver of the package.

copyright:  Copyright (c) 2005 Ister.ORG Ingo Schramm
author:  Ingo Schramm


[ Top ]


Class Methods


constructor IsterSqlDriverMysql

IsterSqlDriverMysql IsterSqlDriverMysql( )

Constructor

[ Top ]

method asyncQuery

boolean asyncQuery( mixed $query)

Send an asynchronous query.

Note: for MySQL this is not really asynchronous like with PostgreSQL; you must fetch all rows before you can send the next query.


return:  true on success, false on error
[ Top ]

method close

boolean close( )

Close the current connection.

[ Top ]

method connect

boolean connect( [boolean $newlink = false])

Establish a connection.

Parameters:

boolean   $newlink   Force a new link to be created.

[ Top ]

method countRows

integer countRows( )

Count the rows in the current result set.

The method returns 0 without any warning if the current result ressource or link are invalid.


return:  Number of rows in current result set, false on error
[ Top ]

method escapeString

string escapeString( string $string, [boolean $binary = false])

Escape a string.

Parameters:

string   $string  
boolean   $binary   ignored by MySQL driver

[ Top ]

method fetchObject

object IsterSqlRow fetchObject( )

Fetch the next IsterSqlRow object of the current result set.

return:  object, null if no rows are left, false on error.
see:  IsterSqlRow
[ Top ]

method free

resource free( )

Free the current result set.

If the last query was an asyncQuery(), the connection will be reopened.


[ Top ]

method getLastError

string getLastError( )

Get the last MySQL or driver error.

[ Top ]

method info

array info( )

This function returns useful information about the active driver.

  1. array( 'driver_name' => $str // name of the driver
  2. 'driver_version' => $str // dotted version number
  3. 'host' => $str // name or IP of the servers host
  4. 'dbname' => $str // current used database
  5. 'port' => $int // port number
  6. 'socket' => $str // socket
  7. 'client_encoding' => $str // client encoding
  8. 'server_version' => $str // version of MySQL server
  9. 'client_version' => $str // version of MySQL client library
  10. 'protokoll_version' => $str // version of used protokoll
  11. 'link' => $str // info about the current connection
  12. );


[ Top ]

method isConnected

boolean isConnected( )

Check whether a connection is established.

[ Top ]

method lastWasRead

boolean lastWasRead( )

Check whether the last query was a read (SELECT) operation or not.

[ Top ]

method pconnect

boolean pconnect( [mixed $newlink = false])

Establish a persistent connection.

[ Top ]

method query

boolean query( mixed $query)

Send a query.

return:  true on success, false on error
[ Top ]

method setLink

boolean setLink( resource $link)

Set the current connection resource.

return:  true on success, false on failure

Parameters:

resource   $link  

[ Top ]

method unescapeString

string unescapeString( string $string, [boolean $binary = false])

Unescape a string.

Parameters:

string   $string  
boolean   $binary   trigger use of stripcslashes() instead of stripslashes()

[ Top ]


Documentation generated on Tue, 20 Dec 2005 11:21:14 +0100 by phpDocumentor 1.3.0RC4