php-db | 2001011
Date: 01/12/01
- Next message: Michael Rudel: "AW: [PHP-DB] "delete" working erratically on ODBC"
- Previous message: Jonathan Kazmierczak: "Re: [PHP-DB] Problem with LONG TEXT fields (ODBC-MS SQL 7)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>
loc. Meleto Valdarno Mail on GSM: (keep it short!)
52020 Cavriglia (AR) faermini <email protected>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Michael Rudel: "AW: [PHP-DB] "delete" working erratically on ODBC"
- Previous message: Jonathan Kazmierczak: "Re: [PHP-DB] Problem with LONG TEXT fields (ODBC-MS SQL 7)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

