maxdb_real_connect
maxdb::real_connect
Opens a connection to a MaxDB server
&reftitle.description;
&style.procedural;
boolmaxdb_real_connect
resourcelink
stringhostname
stringusername
stringpasswd
stringdbname
intport0
stringsocket
&style.oop;
boolmaxdb::real_connect
stringhostname
stringusername
stringpasswd
stringdbname
intport0
stringsocket
maxdb_real_connect attempts to establish a
connection to a MaxDB database engine running on
hostname.
This function differs from maxdb_connect:
maxdb_real_connect needs a valid resource which has
to be created by function maxdb_init
With function maxdb_options you can set various options for connection.
&reftitle.returnvalues;
&return.success;
&reftitle.examples;
&style.oop;
options(MAXDB_UNICODE, "FALSE");
$maxdb->options(MAXDB_TIMEOUT, 5);
/* connect to server */
$maxdb->real_connect('localhost', 'MONA', 'RED', 'DEMODB');
/* check connection */
if (maxdb_connect_errno()) {
printf("Connect failed: %s\n", maxdb_connect_error());
exit();
}
printf ("Connection: %s\n.", $maxdb->host_info);
$maxdb->close();
?>
]]>
&style.procedural;
]]>
&example.outputs.similar;
]]>
&reftitle.seealso;
maxdb_connect
maxdb_init
maxdb_options
maxdb_ssl_set
maxdb_close