Bug #14664: A query that fails makes all subsquent calls to ifx_query fail

From: Date: Sun, 23 Dec 2001 01:10:09 +0000
Subject: Bug #14664: A query that fails makes all subsquent calls to ifx_query fail
Groups: php.dev 
Request: Send a blank email to php-dev+get-74836@lists.php.net to get a copy of this message
From: mlemos@acm.org Operating system: Linux 2.2.x PHP version: 4.1.0 PHP Bug Type: Informix related Bug description: A query that fails makes all subsquent calls to ifx_query fail 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"; ?> -- Edit bug report at: http://bugs.php.net/?id=14664&edit=1

« previous php.dev (#74836) next »