From: babiocop at yahoo dot com Operating system: win7 x64 PHP version: 5.4.20 Package: SQLite related Bug Type: Feature/Change Request Bug description:last error msg and constraint name
Description: ------------ lasterrormsg() shows only "constraint failed" but could also show constraint name like in sqlite command-line client: sqlite> insert into test values(null,null,null); Error: constraint val1 or val2 must be specified failed sqlite> --- >From manual page: http://www.php.net/sqlite3.lasterrormsg#refsect1-sqlite3.lasterrormsg-returnvalues --- Test script: --------------- $db = new SQLite3('test.db', SQLITE3_OPEN_READWRITE); $db->exec('CREATE TABLE test (id INTEGER NOT NULL PRIMARY KEY, val1 INTEGER val2 INTEGER, CONSTRAINT "val1 or val2 must be specified" CHECK (val1 NOT NULL OR val2 NOT NULL))'); $db->exec('INSERT INTO test VALUES (NULL,NULL,NULL)'); echo $db->lasterrormsg(); -- Edit bug report at https://bugs.php.net/bug.php?id=65798&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65798&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65798&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65798&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65798&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65798&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65798&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65798&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65798&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65798&r=support Expected behavior: https://bugs.php.net/fix.php?id=65798&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65798&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65798&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65798&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65798&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65798&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65798&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65798&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65798&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65798&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65798&r=mysqlcfg