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_
Ejemplo 1_ ingres_connect() example <?php
$link = ingres_connect ("mydb", "user", "pass")
or die ("Could not connect");
print ("Connected successfully");
ingres_close ($link);
?> |
|
Ejemplo 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()_