From: Reini U. <ru...@x-...> - 2004-08-05 11:01:11
|
John Cole schrieb: > I'm running the latests CVS code in a test directory on our live database, > and I have been getting a LOT of database errors lately. > > Here is an example when saving a new page: > > Fatal PhpWiki Error > > lib\WikiDB\adodb\adodb-errorhandler.inc.php:76: Fatal[256]: mysql error: > [1062: Duplicate entry '0' for key 1] in ADODB_Error_Handler(INSERT INTO > page (pagename,hits) VALUES('jcole/test4',0), ) > > I seem to be getting a lot more errors when using SQL instead of ADODB. > I'll start saving my error messages for both providers. ADODB is the experimental one, and SQL (PearDB) the stable one. Your mysql page table does seem to have a working auto_increment for the id column, which is not in the query. Maybe we should use "INSERT INTO page (id,pagename) VALUES(NULL,$pagename)" to use an explicit NULL value, which obviously is not used implicitly, but the number 0 instead. I'll test that. Which mysql version? PS: I found recently some charset bugs/problems in recent windows mysql versions, which need to be fixed also in phpwiki. http://bugs.mysql.com/?id=4398 -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |