FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=12673&edit=1

ID: 12673
Updated by: danielc@analysisandsolutions.com
Reported By: antonio dot musarra at romcad dot it
Summary: Return error when execute statement INSERT INTO
[TABLE1] SELECT FROM [TABLE2]
-Status: Open
+Status: Wont fix
Type: Bug
Package: DB
Operating System: SUSE Enterprise Linux Server 10
Package Version: 1.7.13
PHP Version: 4.4.7
Roadmap Versions:
New Comment:

-Status: Open
+Status: Wont fix
Please use MDB2, which properly uses separate methods for select
queries (query()) and data manipulation queries (exec()).


Previous Comments:
------------------------------------------------------------------------

[2007-12-12 09:37:58] amusarra

Description:
------------
Running query type INSERT INTO [Customers] SELECT * FROM [New
Customers] on the Informix database (Driver IFX.php) back error SQLCODE
= 0. The query syntax is correct and supported by Informix.

Test script:
---------------
// Connect to db
...

// Prepared query
$stm = $db->prepare("INSERT INTO import_sap_log_old SELECT * FROM
import_sap_log WHERE id=?");
$data = array($MAX_ID);
$res = $db->execute($s, $data);

....

------------------------------------------------------------------------

Search Discussions

  • Antonio Musarra at Jan 8, 2010 at 1:23 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=12673&edit=1

    ID: 12673
    Updated by: antonio.musarra@romcad.it
    Reported By: antonio dot musarra at romcad dot it
    Summary: Return error when execute statement INSERT INTO
    [TABLE1] SELECT FROM [TABLE2]
    Status: Wont fix
    Type: Bug
    Package: DB
    Operating System: SUSE Enterprise Linux Server 10
    Package Version: 1.7.13
    PHP Version: 4.4.7
    Roadmap Versions:
    New Comment:

    Thanks for your quick response!
    I solved the bug almost immediately after opening.

    Bye,
    Antonio M.


    Previous Comments:
    ------------------------------------------------------------------------

    [2010-01-08 05:21:22] danielc

    -Status: Open
    +Status: Wont fix
    Please use MDB2, which properly uses separate methods for select
    queries (query()) and data manipulation queries (exec()).

    ------------------------------------------------------------------------

    [2007-12-12 09:37:58] amusarra

    Description:
    ------------
    Running query type INSERT INTO [Customers] SELECT * FROM [New
    Customers] on the Informix database (Driver IFX.php) back error SQLCODE
    = 0. The query syntax is correct and supported by Informix.

    Test script:
    ---------------
    // Connect to db
    ...

    // Prepared query
    $stm = $db->prepare("INSERT INTO import_sap_log_old SELECT * FROM
    import_sap_log WHERE id=?");
    $data = array($MAX_ID);
    $res = $db->execute($s, $data);

    ....

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 8, '10 at 5:22a
activeJan 8, '10 at 1:23p
posts2
users2
websitepear.php.net

2 users in discussion

Antonio Musarra: 1 post Danielc: 1 post

People

Translate

site design / logo © 2022 Grokbase