AW: [PHP-DB] "delete" working erratically on ODBC

From: Date: Fri, 12 Jan 2001 15:43:51 +0000
Subject: AW: [PHP-DB] "delete" working erratically on ODBC
Groups: php.db 
Request: Send a blank email to php-db+get-5829@lists.php.net to get a copy of this message
Ciao Fabrizio, try to COMMIT after your first DELETE and then start the Second one and so on. Hope 'tll work. Greetinx, Mike (Germany) -----Ursprüngliche Nachricht----- Von: fabrizio.ermini@sysdat.it [mailto:fabrizio.ermini@sysdat.it] Gesendet: Freitag, 12. Januar 2001 16:39 An: php-db@lists.php.net Betreff: [PHP-DB] "delete" working erratically on ODBC Hi All! I've a encountered a baffling problem in one project of mine. It's a data entry application build to work as a "stand-alone" app - it's all on a PC, built on Win98, PWS, PHP 4.0.3, and access 2000 as DB, accessed (pun not intended!) thru ODBC. I wished to delete all rows from a couple of tables, to start filling them anew. So I issued the following commands: [...] if (!isset($conn)) { $statusOpen=DB_Open(&$conn,$dbName); } if(!$statusOpen) die ("error in DB ".$dbName); $ji=odbc_exec($conn,"DELETE FROM table1"); echo "->$ji<-<br>"; $ji=odbc_exec($conn,"DELETE FROM table2"); echo "->$ji<-<br>"; [...] The two "echo"s are for debug purposes, obviously. Actually, no error condition is returned. On screen I see that both echo print a valid result ID. But the second DELETE is NOT executed! All rows all still there, after the execution. If I change the order of the query, i.e. [...] $ji=odbc_exec($conn,"DELETE FROM table2"); echo "->$ji<-<br>"; $ji=odbc_exec($conn,"DELETE FROM table1"); echo "->$ji<-<br>"; [...] Data in table2 are deleted, and data in table1 are still there! Even If I put some other query in the middle, it appears that only the first "DELETE" is really executed, while the other is silently ignored. Somebody has a clue on what's happening??? TIA, bye! /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Fabrizio Ermini Alternate E-mail: C.so Umberto, 7 faermini@tin.it loc. Meleto Valdarno Mail on GSM: (keep it short!) 52020 Cavriglia (AR) faermini@sms.tin.it -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#5829) next »