hi. i see this error message when i try to change the user interface, when i try to save a contact address, activate a plugin... everywhere i see this error. what im doing wrong?
Contact Adress:
Failed to do query: Incorrect integer value: '' for column 'refid' at row 1
In query: REPLACE INTO address VALUES ('',2,'','','','','','',0,'55584862341','','','')
User Interface:
Failed to do query: Column was set to data type implicit default; NULL supplied for NOT NULL column 'language' at row 1
In query: UPDATE options SET interfaceStyle = 'blu', requireLogin = 1, msgLogin = 'Please log in to access the Address Book Reloaded', allowUserReg = 'no', msgWelcome = 'Welcome to the Address Book Reloaded', limitEntries = 0, autocompleteLimit = 12, bdayDisplay = 1, recentlyChangedDisplay = 0, recentlyChangedLimit = 8, bdayInterval = 21, picAlwaysDisplay = 0, picWidth = 140, picHeight = 140, deleteTrashMode = 1, picAllowUpload = 1, picCrop = 0, countryDefault = 0, language = NULL, eMailAdmin = 0, adminEmailSubject = 'The Address Book Reloaded', adminEmailFooter = 'Best regards, the administrators of The Address Book Reloaded.', administrativeLock = 0, useMailScript = 1 WHERE optID = 1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Could you try if it helps to add the line to the TABR code:
lib/backEnd/DB.class.php, line 106:
function setCharacterSet($charset='utf8')
{
$this->query("SET NAMES $charset");
$this->query("SET SQL_MODE=''"); // add this line of code somewhere in this function
}
Please tell me also the version of your MYSQL installation and if it helped you.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems you can set the mode globally or per session.
You need to set it globally, or perform the upper code modification that sets the mode every time.
SET GLOBAL SQL_MODE='';
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi. i see this error message when i try to change the user interface, when i try to save a contact address, activate a plugin... everywhere i see this error. what im doing wrong?
Contact Adress:
Failed to do query: Incorrect integer value: '' for column 'refid' at row 1
In query: REPLACE INTO address VALUES ('',2,'','','','','','',0,'55584862341','','','')
User Interface:
Failed to do query: Column was set to data type implicit default; NULL supplied for NOT NULL column 'language' at row 1
In query: UPDATE options SET interfaceStyle = 'blu', requireLogin = 1, msgLogin = 'Please log in to access the Address Book Reloaded', allowUserReg = 'no', msgWelcome = 'Welcome to the Address Book Reloaded', limitEntries = 0, autocompleteLimit = 12, bdayDisplay = 1, recentlyChangedDisplay = 0, recentlyChangedLimit = 8, bdayInterval = 21, picAlwaysDisplay = 0, picWidth = 140, picHeight = 140, deleteTrashMode = 1, picAllowUpload = 1, picCrop = 0, countryDefault = 0, language = NULL, eMailAdmin = 0, adminEmailSubject = 'The Address Book Reloaded', adminEmailFooter = 'Best regards, the administrators of The Address Book Reloaded.', administrativeLock = 0, useMailScript = 1 WHERE optID = 1
Thank you for reporting that.
I found a discussion of the issue at MySQL Bugs:
http://bugs.mysql.com/bug.php?id=18551
http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
It is a MySQL 5 issue that needs a different default setting.
Try to execute this in phpMyAdmin or similar:
SET SQL_MODE='';
I do not know how your DB was set to 'TRADITIONAL' mode.
Which other software are you running in the same DB?
Please report back if this worked for you.
hi! thanks for the reply.
i get this message when execute SET
mysql> SET SQL_MODE='';
Query OK, 0 rows affected
i typed this both in navicat console and MySQL Command Line Client.
but the error messages still haunt me.
oh. the database have only the adress book.
i installed sql in this machine only for this purpose.
Could you try if it helps to add the line to the TABR code:
lib/backEnd/DB.class.php, line 106:
function setCharacterSet($charset='utf8')
{
$this->query("SET NAMES $charset");
$this->query("SET SQL_MODE=''"); // add this line of code somewhere in this function
}
Please tell me also the version of your MYSQL installation and if it helped you.
Thanks.
Here is a better link:
http://dev.mysql.com/doc/refman/5.1/en/faqs-sql-modes.html
It seems you can set the mode globally or per session.
You need to set it globally, or perform the upper code modification that sets the mode every time.
SET GLOBAL SQL_MODE='';
hi! now it works!
i edited class.php with the code $this->query("SET SQL_MODE=''");
and it works like a charm.
thanks for you help.
now how can i add this plus signal, like a drop down menu in my adress book? to show contacts stats? and the map option? ^^
Thanks again!