Bug #27826 | 'DB Error: unknown error' on class.issue.php [2] | ||
---|---|---|---|
Submitted: | 14 Apr 2007 17:17 | Modified: | 9 Jul 2013 8:30 |
Reporter: | Schalk Neethling | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Eventum | Severity: | S3 (Non-critical) |
Version: | 2.0 beta 1 | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | db-error |
[14 Apr 2007 17:17]
Schalk Neethling
[16 Apr 2007 5:52]
Bryan Alsdorf
Hi, This appears to be from having a particular SQL mode set. Can you post the output from this command? show variables like '%sql_mode%'; Best Regards, /bryan
[16 Apr 2007 23:41]
Schalk Neethling
SQL result Host: localhost Database: eventum Generation Time: Apr 17, 2007 at 02:41 AM Generated by: phpMyAdmin 2.9.2 / MySQL 5.0.27-community-nt SQL query: show variables like '%sql_mode%'; Rows: 1 Variable_name Value sql_mode STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
[17 Apr 2007 0:04]
Bryan Alsdorf
Hi, This is caused by STRICT_TRANS_TABLES. You can remove this SQL mode for Eventum by changing class.db_api.php, to run the following query everytime it connects SET SQL_MODE = ''; Let me know if you need exact details on how to do this. For future development I will enable strict mode for my development of Eventum. Best Regards, /bryan
[17 Apr 2007 8:16]
Schalk Neethling
Hi Bryan, Would you suggest I place at the top of the file before, or after the require's $TOTAL_QUERIES = 0; SET SQL_MODE = ''; require_once("DB.php"); require_once(APP_INC_PATH . "class.error_handler.php"); or $TOTAL_QUERIES = 0; require_once("DB.php"); require_once(APP_INC_PATH . "class.error_handler.php"); SET SQL_MODE = ''; Thanks!
[25 May 2007 6:32]
Bryan Alsdorf
Set this: $this->dbh->query("SET SQL_MODE=''"); After this line: $this->dbh = DB::connect($dsn);
[9 Jul 2013 8:30]
Yngve Svendsen
Hi. Eventum is now a project independent of MySQL, and its new home (including bug tracking) is here: https://launchpad.net/eventum I am closing this, and ask that the issue, if still relevant, be reported to the Launchpad bug tracker.