Scripting/Squirrel/Functions/mysql select db: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
m (Do not sign your edits)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 16: Line 16:
else mysql_select_db(c,"database");
else mysql_select_db(c,"database");
</pre>
</pre>
== Related Functions ==
{{Scripting/Squirrel/Functions/MySQL Functions}}
[[Category:Scripting/Squirrel/Functions/Mysql_Functions]]

Latest revision as of 18:29, 30 January 2017

Changes the current default database.

Syntax

mysql_select_db( MySQLConnection handler, string database )

Arguments

  • MySQLConnection handler - A valid MySQL link/handler
  • String database - The new database's name

Return value

true on success and/or false on failure.

Example

local c = mysql_connect("localhost","root","password","db2");
if( c ) return 1;
else mysql_select_db(c,"database");

Related Functions