| core_db

# Procedural File: Bs_Db.class.php Source Location: /core/db/Bs_Db.class.php ## Classes: ## Page Details: #### Includes: require_once($APP['path']['core'].'date/Bs_Date.class.php') [line 66] require_once($APP['path']['core'].'util/Bs_System.class.php') [line 65] ### BS_DB_ERROR [line 69]
`BS_DB_ERROR = 1`
[ Top ] ### BS_DB_ERROR_ALREADY_EXISTS [line 73]
`BS_DB_ERROR_ALREADY_EXISTS = 5`
[ Top ] ### BS_DB_ERROR_CANNOT_CREATE [line 83]
`BS_DB_ERROR_CANNOT_CREATE = 15`
[ Top ] ### BS_DB_ERROR_CANNOT_DELETE [line 84]
`BS_DB_ERROR_CANNOT_DELETE = 16`
[ Top ] ### BS_DB_ERROR_CANNOT_DROP [line 85]
`BS_DB_ERROR_CANNOT_DROP = 17`
[ Top ] ### BS_DB_ERROR_CANNOT_SELECT_DB [line 93]
`BS_DB_ERROR_CANNOT_SELECT_DB = 25`
[ Top ] ### BS_DB_ERROR_CONNECT_FAILED [line 92]
`BS_DB_ERROR_CONNECT_FAILED = 24`
[ Top ] ### BS_DB_ERROR_CONSTRAINT [line 71]
`BS_DB_ERROR_CONSTRAINT = 3`
[ Top ] ### BS_DB_ERROR_DIVZERO [line 81]
`BS_DB_ERROR_DIVZERO = 13`
[ Top ] ### BS_DB_ERROR_INVALID [line 76]
`BS_DB_ERROR_INVALID = 8`
[ Top ] ### BS_DB_ERROR_INVALID_DATE [line 80]
`BS_DB_ERROR_INVALID_DATE = 12`
[ Top ] ### BS_DB_ERROR_INVALID_DSN [line 91]
`BS_DB_ERROR_INVALID_DSN = 23`
[ Top ] ### BS_DB_ERROR_INVALID_NUMBER [line 79]
`BS_DB_ERROR_INVALID_NUMBER = 11`
[ Top ] ### BS_DB_ERROR_INVALID_RS [line 95]
`BS_DB_ERROR_INVALID_RS = 27`
[ Top ] ### BS_DB_ERROR_MISMATCH [line 75]
`BS_DB_ERROR_MISMATCH = 7`
[ Top ] ### BS_DB_ERROR_NEED_MORE_DATA [line 88]
`BS_DB_ERROR_NEED_MORE_DATA = 20`
[ Top ] ### BS_DB_ERROR_NODBSELECTED [line 82]
`BS_DB_ERROR_NODBSELECTED = 14`
[ Top ] ### BS_DB_ERROR_NOSUCHFIELD [line 87]
`BS_DB_ERROR_NOSUCHFIELD = 19`
[ Top ] ### BS_DB_ERROR_NOSUCHTABLE [line 86]
`BS_DB_ERROR_NOSUCHTABLE = 18`
[ Top ] ### BS_DB_ERROR_NOT_CAPABLE [line 77]
`BS_DB_ERROR_NOT_CAPABLE = 9`
[ Top ] ### BS_DB_ERROR_NOT_CONNECTED [line 94]
`BS_DB_ERROR_NOT_CONNECTED = 26`
[ Top ] ### BS_DB_ERROR_NOT_FOUND [line 72]
`BS_DB_ERROR_NOT_FOUND = 4`
[ Top ] ### BS_DB_ERROR_NOT_LOCKED [line 89]
`BS_DB_ERROR_NOT_LOCKED = 21`
[ Top ] ### BS_DB_ERROR_SYNTAX [line 70]
`BS_DB_ERROR_SYNTAX = 2`
[ Top ] ### BS_DB_ERROR_TRUNCATED [line 78]
`BS_DB_ERROR_TRUNCATED = 10`
[ Top ] ### BS_DB_ERROR_UNSUPPORTED [line 74]
`BS_DB_ERROR_UNSUPPORTED = 6`
[ Top ] ### BS_DB_ERROR_VALUE_COUNT_ON_ROW [line 90]
`BS_DB_ERROR_VALUE_COUNT_ON_ROW = 22`
[ Top ] ### BS_DB_FETCHMODE_ASSOC [line 106]
`BS_DB_FETCHMODE_ASSOC = 2`
Column data indexed by column names [ Top ] ### BS_DB_FETCHMODE_ORDERED [line 101]
`BS_DB_FETCHMODE_ORDERED = 1`
Column data indexed by numbers, ordered from 0 and up [ Top ] ### BS_DB_VERSION [line 2]
`BS_DB_VERSION = '4.5.$Revision: 1.6 $'`
[ Top ] ### getDbObject [line 30]
`&object &getDbObject( [array $dsn = null])`
function to get a db object for a given dsn (DB Servic Name). note: this is a function, not a method of a db object. if $dsn is not given or set to null, a reference to the global shared db object will be returned. if it does not exist, this function tries to open the connection for it. example: $dsn = array('host'=>'localhost', 'port'=>3306, 'user'=>'foo', 'pass'=>'bar', 'syntax'=>'mysql', 'type'=>'mysql'); $db = &getDbObject($dsn); ^ ^ important!!! ^ WARNING: if $dsn['name'] is given (for a database name) the database won't be selected automatically! do that yourself. #### Tags:
return: | (instance of a subclassed db class)
throws: | bs_exception
access: | public
copyright: | blueshoes.org
author: | andrej arn <at blueshoes dot org>, Sam Blum <sam at blueshoes dot org>
#### Parameters
array | $dsn | (a hash, see Bs_Form->dbDsn for a description)
[ Top ] Documentation generated on Mon, 29 Dec 2003 21:08:43 +0100 by phpDocumentor 1.2.3