Scripting/Squirrel/Functions/mysql select db

From Vice City Multiplayer
Revision as of 18:55, 4 March 2016 by KAKAN (talk | contribs) (Created page with "Changes the current default database. == Syntax == <pre>mysql_select_db( MySQLConnection handler, string database )</pre> == Arguments == * ''MySQLConnection'' '''handler'''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

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");

By KAKAN