symfony API

sfMySQLDatabase Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.4 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:

sfMySQLDatabase provides connectivity for the MySQL brand database.

Inheritence

sfMySQLiDatabase  <  sfMySQLDatabase  <  sfDatabase

Method Summary

  • connect()
    Connects to the database.
  • string getConnectMethod($persistent)
    Returns the appropriate connect method.
  • bool selectDatabase($database)
    Selects the database to be used in this connection
  • void shutdown()
    Execute the shutdown procedure

Methods inherited from sfDatabase

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

Method Details

  • connect () Browse code

    Connects to the database.

    throws sfDatabaseException If a connection could not be created

  • (string) getConnectMethod ($persistent) Browse code

    $persistent wether persistent connections are use or not

    Returns the appropriate connect method.

    returns name of connect method.

  • (bool) selectDatabase ($database) Browse code

    $database Name of database to be connected

    Selects the database to be used in this connection

    returns true if this was successful

  • (void) shutdown () Browse code

    Execute the shutdown procedure

    throws sfDatabaseException If an error occurs while shutting down this database