MYSQL提供了奇怪的错误消息

For some reason if i submit the "Nová objednávka pro návštěvníka" within my database it causes this error message. i did notice in the db if it does enter the db some char are replaced with ?.


An error occurred while saving this configuration: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=', query was: SELECT Job_Id, tablename_colummname, email_template, days FROM Envato_CustomConfig_Job WHERE tablename_colummname = :tablename_c AND email_template = :email AND days = :days AND timeStamp = :timeStamp AND Job_Id != :id LIMIT 1;

heres the sql i used to create the table.

DROP TABLE IF EXISTS {$this->getTable('Envato_CustomConfig_Job')};
CREATE TABLE {$this->getTable('Envato_CustomConfig_Job')} (
  `Job_Id` int(11) NOT NULL AUTO_INCREMENT,
  `tablename_colummname` varchar(100) NOT NULL,
  `email_template` varchar(100) NOT NULL,
  `days` INT(2) NOT NULL,
  `timeStamp`  varchar(100) NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`Job_Id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; 

Add BINARY to your WHERE-Clause like this for example:

WHERE BINARY tablename_colummname = BINARY :tablename_c

I hope this helps :-)