Saturday, June 11, 2011
How to Test PHP Informix Connectivity?
The following code snippet allows you test the PHP-Informix Connectivity:
<?php
error_reporting(E_ALL);
$Informix_Server_Name = "ol_ids_1150_1";
putenv("INFORMIXSERVER=".$Informix_Server_Name);
$conn_id = ifx_connect("sysadmin@ol_ids_1150_1", "informix_user_name", "password");
$x = ifx_query("select * from mon_table_name",$conn_id);
ifx_htmltbl_result($x, "border=\"1\"");
<?php
error_reporting(E_ALL);
$Informix_Server_Name = "ol_ids_1150_1";
putenv("INFORMIXSERVER=".$Informix_Server_Name);
$conn_id = ifx_connect("sysadmin@ol_ids_1150_1", "informix_user_name", "password");
$x = ifx_query("select * from mon_table_name",$conn_id);
ifx_htmltbl_result($x, "border=\"1\"");
?>
In general, the above code helps you set the INFORMIXSERVER environment variable required for your ifx_connect function.
In general, the above code helps you set the INFORMIXSERVER environment variable required for your ifx_connect function.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment