Class db

Description

$Id: db_mysql.class.php,v 1.0 2005/09/15 19:32:45 Kuzma Exp $

Copyright (C) 2005 Kuzma Feskov <kuzma@russofile.ru>

KF_SITE_VERSION

CLASS DESCRIPTION: DB_MYSQL The class-example showing variant of creation of the own engine for dialogue with a database, it's emulate some ADODB functions (ATTENTION, class only shows variant of a spelling of the driver, use it only as example)

This source file is part of the KFSITE Open Source Content Management System.

This file may be distributed and/or modified under the terms of the "GNU General Public License" version 2 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.

This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

The "GNU General Public License" (GPL) is available at http:*www.gnu.org/copyleft/gpl.html.

Located in /db_mysql.class.php (line 31)


        
                        
Variable Summary
resource $conn
Method Summary
db db (mixed $host, mixed $user, mixed $password, mixed $database)
void CacheExecute (integer $cache, string $sql)
void Close ()
void CompleteTrans ()
string ErrorMsg ()
object Recordset Execute (string $sql)
void FailTrans ()
void GenID (string $seqname, integer $start)
string GetInsertSQL (object $recordset, array $data)
unknown GetOne (string $sql)
string GetUpdateSQL (object $recordset, array $data)
void StartTrans ()
Variables
resource $conn (line 37)

Database connection

Methods
Constructor db (line 44)

Constructor

  • return: object
db db (mixed $host, mixed $user, mixed $password, mixed $database)
CacheExecute (line 94)

Cache SQL query (added for compatibility), not realized

void CacheExecute (integer $cache, string $sql)
  • integer $cache
  • string $sql: - SQL query
Close (line 207)

Close database connection

void Close ()
CompleteTrans (line 190)

Transactions mechanism (added for compatibility, not realised)

void CompleteTrans ()
ErrorMsg (line 199)

Return database error message

string ErrorMsg ()
Execute (line 79)

Execute SQL query

object Recordset Execute (string $sql)
  • string $sql: - SQL query
FailTrans (line 182)

Transactions mechanism (added for compatibility, not realised)

void FailTrans ()
GenID (line 61)

Generate unique insert ID

void GenID (string $seqname, integer $start)
  • string $seqname: - Sequence table name
  • integer $start: - Initial value
GetInsertSQL (line 138)

Generate SELECT SQL query

  • return: - Complete SQL query or empty string
string GetInsertSQL (object $recordset, array $data)
  • object $recordset: - SELECT query result
  • array $data: - Contains parameters for additional fields of a tree (if is): array('filed name' => 'importance', etc)
GetOne (line 162)

Return on field result

unknown GetOne (string $sql)
  • string $sql: - SQL query
GetUpdateSQL (line 105)

Generate UPDATE SQL query

  • return: - Complete SQL query or empty string
string GetUpdateSQL (object $recordset, array $data)
  • object $recordset: - SELECT query result
  • array $data: - Contains parameters for additional fields of a tree (if is): array('filed name' => 'importance', etc)
StartTrans (line 174)

Transactions mechanism (added for compatibility, not realised)

void StartTrans ()

Documentation generated on Fri, 16 Sep 2005 16:50:26 +0400 by phpDocumentor 1.3.0RC3