CI_Loader::database()

database([$params = ''[, $return = FALSE[, $query_builder = NULL]]])

Parameters:
  • $params (mixed) – Database group name or configuration options
  • $return (bool) – Whether to return the loaded database object
  • $query_builder (bool) – Whether to load the Query Builder
Returns:

Loaded CI_DB instance or FALSE on failure if $return is set to TRUE, otherwise CI_Loader instance (method chaining)

Return type:

mixed

This method lets you load the database class. The two parameters are optional. Please see the database section for more info.

doc_CodeIgniter
2016-10-15 16:31:43
Comments
Leave a Comment

Please login to continue.