downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ovrimos_cursor> <ovrimos_commit
Last updated: Fri, 13 Nov 2009

view this page in

ovrimos_connect

(PHP 4 >= 4.0.3, PHP 5 <= 5.0.5)

ovrimos_connect指定したデータベースに接続する

説明

int ovrimos_connect ( string $host , string $dborport , string $user , string $password )

指定したデータベースに接続します。

パラメータ

host

ホスト名あるいは IP アドレス。

dborport

データベース名、あるいは接続するポート番号。

user

ユーザ名。

password

user のパスワード。

返り値

成功した場合に接続 ID (0 より大きい値)、 失敗した場合に 0 を返します。

例1 ovrimos_connect() の例

<?php
$conn 
ovrimos_connect("server.example.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);
}
?>

参考



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: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites