This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.
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.
<?php
$link = ingres_connect ("mydb", "user", "pass")
or die ("Could not connect");
print ("Connected successfully");
ingres_close ($link);
?><?php
ingres_connect ("mydb", "user", "pass")
or die ("Could not connect");
print ("Connected successfully");
ingres_close ();
?>See also ingres_pconnect() and ingres_close().
| This HTML Help has been published using the chm2web software. |