/**
  * Open a connection to db
  */
 public function connect()
 {
     $this->conn = ifx_connect($this->dbname . "@" . $this->host, $this->user, $this->pwd);
     if (!$this->conn) {
         trigger_error(ifx_errormsg(), E_USER_ERROR);
     }
     ifx_blobinfile_mode(0);
     ifx_textasvarchar(1);
     ifx_byteasvarchar(1);
     return $this->conn;
 }
Esempio n. 2
0
	function ADODB_informix72()
	{
		// alternatively, use older method:
		//putenv("DBDATE=Y4MD-");

		// force ISO date format
		putenv('GL_DATE=%Y-%m-%d');
		
		if (function_exists('ifx_byteasvarchar')) {
			ifx_byteasvarchar(1); // Mode "0" will return a blob id, and mode "1" will return a varchar with text content. 
        	ifx_textasvarchar(1); // Mode "0" will return a blob id, and mode "1" will return a varchar with text content. 
        	ifx_blobinfile_mode(0); // Mode "0" means save Byte-Blobs in memory, and mode "1" means save Byte-Blobs in a file.
		}
	}