相关疑难解决方法(0)

错误1265.尝试从txt文件加载数据时,列的数据被截断

我在mysql表的表中看起来像

create table Pickup
(
PickupID int not null,
ClientID int not null,
PickupDate date not null,
PickupProxy  varchar (40) ,
PickupHispanic bit default 0,
EthnCode varchar(2),
CategCode varchar (2) not null,
AgencyID int(3) not null,

Primary Key (PickupID),
FOREIGN KEY (CategCode) REFERENCES Category(CategCode),
FOREIGN KEY (AgencyID) REFERENCES Agency(AgencyID),
FOREIGN KEY (ClientID) REFERENCES Clients (ClientID),
FOREIGN KEY (EthnCode) REFERENCES Ethnicity (EthnCode)
);

sample data from my txt file 
1065535,7709,1/1/2006,,0,,SR,6
1065536,7198,1/1/2006,,0,,SR,7
1065537,11641,1/1/2006,,0,W,SR,24
1065538,9805,1/1/2006,,0,N,SR,17
1065539,7709,2/1/2006,,0,,SR,6
1065540,7198,2/1/2006,,0,,SR,7
1065541,11641,2/1/2006,,0,W,SR,24
Run Code Online (Sandbox Code Playgroud)

当我试图通过使用提交它

LOAD DATA INFILE 'Pickup_withoutproxy2.txt' …
Run Code Online (Sandbox Code Playgroud)

mysql csv

13
推荐指数
5
解决办法
14万
查看次数

将HTML保存到MySQL警告:#1265列的数据被截断

我收到错误消息说"0行受影响.警告:#1265数据在第1行截断列'内容'"当我将我的html保存到Mysql数据库时.

Html如下:

关于我们
    <p>We are revolutionising the way people shop around the world by providing the freedom to purchase from any website using your very own US or UK shipping address. We're used by both consumers and businesses to buy all sorts of products and merchandise from overseas. Have a look at what people are <a href="/pages/testimonials">saying</a> about us.</p>
    <h2 class="title" id="title"> We<span class="green"> Offer</span> </h2>
    <ul class="arr">
      <li>Great deals from all over the globe on a range of products …
Run Code Online (Sandbox Code Playgroud)

html php mysql

0
推荐指数
1
解决办法
9650
查看次数

标签 统计

mysql ×2

csv ×1

html ×1

php ×1