Db select db: Difference between revisions From Online Manual

Jump to: navigation, search
(Created page with "{{smcfunc |function=db_select_db |usage=$smcFunc['db_select_db'] (database_name, connection) |description=In MySQL the function selects a database like the function [http://php....")
 
No edit summary
Line 11: Line 11:


<noinclude>
<noinclude>
[[Category:Database Functions]]
[[Category:Database Functions]]</noinclude>
[[Category:2.0]]
[[Category:Customizing SMF]]
[[Category:Developing SMF]]</noinclude>

Revision as of 21:52, 8 October 2012

Usage:

$smcFunc['db_select_db'] (database_name, connection)


Description: In MySQL the function selects a database like the function mysql_select_db. In PostgreSQL returns always true since the database is selected upon creating the connection. In SQlite will do nothing as there is only one database per file.

Parameters:

  • database_name The name of the database you want to switch to.
  • connection

Return: Like mysql_select_db returns true on success, false on failure.



Advertisement: