CMC for PHP
  • Namespace
  • Class
  • Tree

Namespaces

  • cmc
    • core
      • ui
    • db
      • mysqli
    • error
    • ui
      • widgets
  • PHP

Classes

  • database
  • databasefactory
  • dataenv
  • dataquery
  • datatable

Interfaces

  • datasource
  • IBrowsable
  • ICreatable
  • IFilter
  • IMetaInfo
  • IPrimaryKey
  • IUpdatable

Exceptions

  • DatabaseException

CMC for PHP is a web framework for PHP.
Copyright (c) 2014 by Calmarsoft company http://calmarsoft.com (FRANCE). All rights reserved.
Project information available here.

Class database

the database abstract model

Direct known subclasses

cmc\db\mysqli\database_mysqli

Abstract
Namespace: cmc\db
Copyright: Copyright (c) Calmarsoft company (FRANCE) (http://calmarsoft.com)
License: GNU General Public License version 3
Version: 0.9
Link: CMC Project
Located at db/database.php

Methods summary

public
# __construct( string $dataenv, string $database, mixed $server )

Parameters

$dataenv
string
database name if any
$database
string
server name, IP address, ...
$server
abstract public boolean
# is_connected( )

is the database connected?

is the database connected?

Returns

boolean
public string
# lastError( )

last error string

last error string

Returns

string
public
# setLogin( string $user, string $passwd = null )

user/password authentication

user/password authentication

Parameters

$user
string
user
$passwd
string
password
public
# setPort( integer $port )

sets a port number

sets a port number

Parameters

$port
integer
$port
public
# dataenv( )
abstract public boolean
# connect( )

opens connection

opens connection

Returns

boolean
abstract public
# disconnect( )

closes connection

closes connection

abstract public
# getLastError( )

gets the last native errortext

gets the last native errortext

abstract public cmc\db\dataquery
# getdataSource( mixed $sqlData )

creates a datasource object from sql Text may be checked and/or prepared depending on implementation

creates a datasource object from sql Text may be checked and/or prepared depending on implementation

Returns

cmc\db\dataquery

Throws

DatabaseException_mysqli
abstract public cmc\db\datatable
# gettable( mixed $tablename, mixed $sort = null )

creates an object for 'table' acccess

creates an object for 'table' acccess

Returns

cmc\db\datatable
public boolean
# executeQueries( string $text )

direct execution of multiple queries, with a semicolon separation typical use is SQL scripts in case of failure, it stops execution and throws exception

direct execution of multiple queries, with a semicolon separation typical use is SQL scripts in case of failure, it stops execution and throws exception

Parameters

$text
string
$text

Returns

boolean

Throws

cmc\db\DatabaseException

Magic methods summary

Properties summary

protected mixed $_de
#
protected mixed $_user
#
protected mixed $_passwd
#
protected mixed $_server
#
protected mixed $_database
#
protected mixed $_port
#
protected mixed $_lasterror
#
CMC for PHP API documentation generated by ApiGen 2.8.0