ID: 24125 Comment by: giosp at panozzo dot it Reported By: michael at redboxcode dot com Status: No Feedback Bug Type: ODBC related Operating System: Win NT PHP Version: 4.3.2 New Comment:
My platform: PHP4.3.9, Win2003, .mdb file It seems that INSERT and DELETE are cached, they never get executed if they are the last sql commands of your script. Adding a "SELECT" at the end (as in the following sample), make them works. <?php $dsn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\Inetpub\wwwroot\pxfm\db\pxfmw.mdb;DefaultDir=C:\Inetpub\wwwroot\pxfm\db"; $con = odbc_pconnect($dsn,"","") or die("Connection error<BR>\n".odbc_errormsg()); $r = odbc_exec($con,"select * from testtab") or die("error: ".odbc_errormsg()); while( odbc_fetch_row($r) ) { print "ID=".odbc_result($r,"id")."<BR>\n"; print "NAME=".htmlspecialchars(odbc_result($r,"name"))."<BR>\n"; print "<P>\n"; } // This is just silently ignored !! odbc_exec($con,"INSERT INTO testtab (id,name) values(12,'john')") or die("exec error!"); // If you uncomment the following line, the INSERT is executed, but not the DELETE // odbc_exec($con,"DELETE FROM testtab") or die("delete error"); // The following line makes it works, despite id=99999 does not exists // odbc_exec($con,"SELECT * from testtab where id=99999"); ?> Previous Comments: ------------------------------------------------------------------------ [2003-08-18 19:44:02] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2003-08-14 00:38:28] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-06-25 15:05:15] [EMAIL PROTECTED] Please turn on SQL Logging in your ODBC Administrator and post the appropriate portions to this bug... aka from the first initial connect to the last ODBC command for the script. Please note you MAY need to delete the unique identifing material in the script (aka a username/password). ------------------------------------------------------------------------ [2003-06-17 20:46:45] michael at redboxcode dot com I've upgraded my development machine to 4.3.2 and the behavior still exist. ------------------------------------------------------------------------ [2003-06-16 08:30:06] [EMAIL PROTECTED] Please update to PHP 4.3.2 first. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/24125 -- Edit this bug report at http://bugs.php.net/?id=24125&edit=1