From:             [EMAIL PROTECTED]
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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to