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

search for in the

ingres_cursor> <ingres_commit
Last updated: Fri, 22 Aug 2008

view this page in

ingres_connect

(PHP 4 >= 4.0.2, PHP 5 <= 5.0.5, PECL ingres:1.0-1.4.3)

ingres_connectOpen a connection to an Ingres II database.

Description

resource ingres_connect ([ string $database [, string $username [, string $password ]]] )

Returns a Ingres II link resource on success, or FALSE on failure.

ingres_connect() opens a connection with the Ingres database designated by database , which follows the syntax [node_id::]dbname[/svr_class] .

If some parameters are missing, ingres_connect() uses the values in php.ini for ingres.default_database , ingres.default_user and ingres.default_password .

The connection is closed when the script ends or when ingres_close() is called on this link.

All the other ingres functions use the last opened link as a default, so you need to store the returned value only if you use more than one link at a time.

Example #1 ingres_connect() example

<?php
    $link = ingres_connect ("mydb", "user", "pass")
        or die ("Could not connect");
    print ("Connected successfully");
    ingres_close ($link);
?>
     

Example #2 ingres_connect() example using default link

<?php
    ingres_connect ("mydb", "user", "pass")
        or die ("Could not connect");
    print ("Connected successfully");
    ingres_close ();
?>
     

See also ingres_pconnect(), and ingres_close().



add a note add a note User Contributed Notes
ingres_connect
tdjunk at openxtrem dot com
26-Jun-2007 02:09
You need to connect with the user running your web server, be it apache, nobody, or system (on MS Windows). Hence you have to create a matching (username) Ingres user.

Otherwise you may experience an Ingres Error :

 790536 : Unable to authenticate client's user ID.

See more information on the community forum : http://community.ingres.com/forums/viewtopic.php?t=1370

ingres_cursor> <ingres_commit
Last updated: Fri, 22 Aug 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites