symfony API

sfMySQLDatabase Class

« Back to API menu

action

addon

autoload

cache

command

config

controller

creole

database

debug

exception

filter

form

generator

helper

i18n

log

plugin

propel

request

response

routing

storage

task

test

user

util

validator

view

widget

You are currently browsing the symfony documentation for the 1.1 version. Switch to:

sfMySQLDatabase provides connectivity for the MySQL brand database.

Inheritence

sfMySQLiDatabase  <  sfMySQLDatabase  <  sfDatabase

Method Summary

  • bool selectDatabase($database)
    Selects the database to be used in this connection
  • shutdown()
    Execute the shutdown procedure
  • connect()
    Connects to the database.
  • string getConnectMethod($persistent)
    Returns the appropriate connect method.
  • array&amp; loadParameters([[[amp]]]$array)
    Loads connection parameters from an existing array.

Methods inherited from sfDatabase

__construct , shutdown , hasParameter , getParameter , connect , initialize , getResource , getParameterHolder , getConnection , setParameter

Method Details

  • (bool) selectDatabase ($database)

    $database Name of database to be connected

    Selects the database to be used in this connection

    returns true if this was successful

  • shutdown ()

    Execute the shutdown procedure

    throws sfDatabaseException If an error occurs while shutting down this database

  • connect ()

    Connects to the database.

    throws sfDatabaseException If a connection could not be created

  • (string) getConnectMethod ($persistent)

    $persistent wether persistent connections are use or not

    Returns the appropriate connect method.

    returns name of connect method.

  • (array&amp;) loadParameters ([[[amp]]]$array)

    Loads connection parameters from an existing array.

    returns An associative array of connection parameters