Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

ovrimos_connect

(PHP 4 >= 4.0.3, PHP 5)

ovrimos_connect -- Connect to the specified database

Description

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

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



add a note add a note User Contributed Notes
ovrimos_connect
There are no user contributed notes for this page.

ovrimos_cursor> <ovrimos_commit
Last updated: Sat, 27 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571