Pike v8.1 release 6

Method Msql.msql()->select_db()


Method select_db

void select_db(string dbname)

Description

Before querying a database you have to select it. This can be accomplished in two ways: the first is calling the create function with two arguments, another is calling it with one or no argument and then calling select_db. You can also use this function to change the database you're querying, as long as it is on the same server you are connected to.

Throws

This function CAN raise exceptions in case something goes wrong (for example: unexistant database, insufficient permissions, whatever).

See also

create, error