|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-03-22 07:10 UTC] samuel_carriere at hotmail dot com
[2002-03-22 07:14 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 19:00:01 2025 UTC |
As demonstrated by the following example if the first (real) query (besides DATABASE query) fails, any subsequent calls to ifx_query fail with the same error, suggesting that something from first query failure state is incorrectly affecting the execution of any following query. <?php $informix_server="demo_on"; $database_name="test"; $user="testuser"; $password="testpassword"; PutEnv("INFORMIXSERVER=$informix_server"); if(($connection=ifx_connect("@".$informix_server,$user,$password))) { if(($result=@ifx_query("DATABASE $database_name",$connection))) { echo "Database: $database_name, Result: $result\n"; ifx_free_result($result); if(($result=ifx_query("DROP TABLE test",$connection))) ifx_free_result($result); else { $first_query_error=ifx_errormsg(); if(($result=ifx_query("CREATE TABLE test",$connection))) ifx_free_result($result); else echo "First query error: $first_query_error\nSecond query error: ".ifx_errormsg(),"\n"; } } else echo "Database: $database_name Query error: ".ifx_errormsg(),"\n"; ifx_Close($connection); } else echo "Connection error: ".ifx_errormsg(),"\n"; ?>