Unique key violation

From: Date: Wed, 28 Jan 2004 08:33:40 +0000
Subject: Unique key violation
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10396@lists.php.net to get a copy of this message
Hello all I have a very simple problem with the DB Package, but I don't get a solution. I have a twofield unique key on a table. If i try to insert a invalid record, due to the unique key, i got no error. Of course the record wil not be inserted, but DB::isError($sth) and DB::isError($db) dont show an error. I tried to use DB::iswarning($db), which i found in the doc, but in this case i got the fowlling error: Call to undefined function: iswarning() I use PHP 4.3.4, MySQL 4.0.16, PEAR DB-1.6.0RC1 Statement: $sth = $db->autoPrepare($CT_LEGELEISTUNG, $fieldsANDvalues["fields"], DB_AUTOQUERY_INSERT); $db->execute($sth, $fieldsANDvalues["values"]); if (DB::isError($sth)) { raise_error ("legeleistung.inc->ins_legeleistung", $sth); } What can I do?

« previous php.pear.general (#10396) next »