(PHP 4 >= 4.0.3)

ovrimos_connect -- Connect to the specified database


int ovrimos_connect ( string host, string db, string user, string password)

ovrimos_connect() is used to connect to the specified database.

ovrimos_connect() returns a connection id (greater than 0) or 0 for failure. The meaning of host and db are those used everywhere in Ovrimos APIs. host is a host name or IP address and db is either a database name, or a string containing the port number.

例子 1. ovrimos_connect() Example

= ovrimos_connect("server.domain.com", "8001", "admin", "password");
if (
$conn != 0) {
"Connection ok!";
$res=ovrimos_exec($conn, "select table_id, table_name from sys.tables");
    if (
$res != 0) {
"Statement ok!";
The above example will connect to the database and print out the specified table.

虎的笑话 虎的成语 虎的歇后语