简体   繁体   English

通过CSV添加新信息时,db中的旧信息不显示-phpMyAdmin

[英]old info in db not displaying when new info is added via CSV - phpMyAdmin

I am trying to upload a csv file into phpMyAdmin, this is quite simple, and the data goes to the correct columns, but then the old data does not show. 我正在尝试将CS​​V文件上传到phpMyAdmin中,这非常简单,并且数据进入正确的列,但是随后的旧数据不显示。

The database is called "dogoodmapdb", with tables map - place_id, name, address, lat, lng, email, phone, bio, type, area, country, need, capture_id and users - user_id, first_name, last_name, email, phone 该数据库称为“ dogoodmapdb”,具有表映射place_id, name, address, lat, lng, email, phone, bio, type, area, country, need, capture_id和用户-用户place_id, name, address, lat, lng, email, phone, bio, type, area, country, need, capture_id user_id, first_name, last_name, email, phone

The MAP table holds data to go on a google map at this website: www.dogoodmap.org and it already has around 260 places on it. MAP表包含要在以下网站的Google地图上显示的数据: www.dogoodmap.org ,它上面已经有260个位置。

Currently we have to upload each place individually, so I need to be able to upload a csv file into the phpMyAdmin to get it to run faster! 当前,我们必须分别上载每个地方,因此我需要能够将csv文件上载到phpMyAdmin中,以使其运行更快!

I have a csv with the needed data, an headings. 我有一个带有所需数据的csv,一个标题。 When I insert it into phpMyAdmin, it works fine, the places appear in the database, but then NOTHING on the map shows. 当我将其插入phpMyAdmin时,它可以正常工作,该位置出现在数据库中,但是地图上没有显示。 Then I have to delete them, once I have deleted all of them, the old data shows. 然后,我必须删除它们,一旦删除所有它们,就会显示旧数据。

I have also looked at tutorials using php script that pulls the info from the csv file and INSERT TO into the database, and I have re-written about 6 different tutorial scripts, but none of them work. 我也看过使用php脚本的教程,这些脚本将csv文件和INSERT TO的信息提取到数据库中,并且我已经重写了大约6种不同的教程脚本,但是它们都不起作用。

I have looked around for answers, but it seems to me that I am the only one experiencing this issue. 我四处寻找答案,但在我看来,我是唯一遇到此问题的人。 I have checked for any possible errors in the csv file, there are non. 我检查了csv文件中是否存在任何可能的错误,没有。 I have checked the delimiter, and it looks fine. 我已经检查了定界符,看起来不错。 It uploads to the database, but then it wont let any data show. 它上传到数据库,但随后不会显示任何数据。

Please help me. 请帮我。 We have around 2000-3000 places in a csv file, but do not have the time to upload individually! CSV文件中大约有2000-3000个位置,但没有时间单独上传!

Thanks in advance 提前致谢

Try with sql load data infile http://dev.mysql.com/doc/refman/5.1/en/load-data.html . 尝试在文件http://dev.mysql.com/doc/refman/5.1/en/load-data.html中使用sql加载数据。

Example: 例:

LOAD DATA INFILE 'data.txt' INTO TABLE db2.my_table;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM