An Entrepreneur, Coach, IT Consultant, Strategic Adviser, and a Traveler craving to explore and contribute to forming a better society.

Saturday, June 11, 2011

How to Test PHP Informix Connectivity?

No comments :
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\"");


?>

In general, the above code helps you set the INFORMIXSERVER environment variable required for your ifx_connect function.

No comments :