Django admin Chinese error Incorrect string value solution
For errors"
Incorrect string value: '\ xE6 \ xA2 \ xB5 \ xE8 \ x92 \ x82...' for column 'object _ repr' at row 1
"
The solution is to set object_repr of the django_admin_log table to use utf8_unicode_ci;
For errors"
Incorrect string value: '\ xE6 \ xA2 \ xB5 \
Tags: cloud prim mysql val mysq over set key questionExecute SQL as follows:CREATE TABLE `qcloud_sms_template` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`ctime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(`id`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Execution Result:ERROR 1067 (42000): Invalid default value for ‘ctime‘
This SQL in
|xargs sed-i "s/log_threshold =. *;$/log_threshold = 1;/g;s/show_debug_error s =. *;$/show_debug_errors = false;/g "
II): SED implementation of the PHP code to a feature to comment on a line (such as: The project online do not want it to open error reporting to users):If you want to:Error_reporting (e_all ^ e_notice); Change:Error_reporting (e_all ^ e_notice);Sed substitution method:
Sed ' s/error_reporting///error_reporting/g './index.php
And: can
:
Copy Code code as follows:
[SQL] INSERT INTO Doc_main (Title,typeid,uptime,intro,ifhot,imgurl1,doctype,fileurl1,shunxu,titleurl,qitype) values (' Test ', ', ' 2011-5-30 ', ' Test ', ' 1 ', ', ' 0 ', ', ', ', ', ', ', ' 279 ')
[ERR] 1366-incorrect integer value: ' For column ' Shunxu ' at row 1
After viewing the datasheet, we found that the Shunxu field requires an integer, and the default is
Use DataStage to load data to the following table for an error.Table structureCREATE TABLE BIGINT not NULL as IDENTITY with 1 by 1 VARCHAR (+))ErrorSolutionsNew Table T_tmpCREATE TABLE BIGINT VARCHAR (+))Import to this table and then use INSERT INTO ... SELECT ... Statement to import to T tableINSERT into SELECT from T_tmpThis allows the data to be imported perfectly.DataStage Loading Data error -798
Problem DescriptionThere is a mysql database, where a table field is:('Date' timestamp not null default '2017-00-00 00:00:00 ').Default value of date in database: 0000-00-00 00:00:00Java program throws the following error:... '2017-00-00 00:00:00 'can not be represented as java. SQL. Timestamp .......SolutionModify JDBC URLJdbc: mysql: //
Today, the Chinese blog Alliance has bo friends feedback, zgboke.com can not submit blog, I was just ready to go to the Holiday Plaza Party, on the rush to submit a trial, found that the blog submitted when the following error is reported:
Tip Web_pic cannot be a null value. I am very puzzled, can be successfully submitted before, why suddenly die? Looked a
Attach the code First:1 @ Page Language="Java"Import="java.util.*"pageencoding="UTF-8"%>2 3 DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en">4 HTML>5 Head> 6 title>Jsp:setproperty Labeltitle>7 Head>8 9 Body>Ten Jsp:usebeanID= "Person"class= "edu.hust.domain.Person"Scope= "page"/> One manually assigning a value to a bean property - A Jsp:setpropertyname= "Person" Property= "Name"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.