I am using phpMyAdmin to create a table with information for a timetable.

Activity|Start|End|Day|Room

I am populating the table from a CSV file. When the schedule changes (adding new activity, time changes, etc) I want to import the CSV file again but have that replace all information stored in the table so that only the new Schedule information is stored.

In the Import section of phpMyAdmin I have the following settings

  • Format CSV
  • Replace table data with file
  • Columns separated with: ,
  • Columns enclosed with: "
  • Columns escaped with: /
  • Lines terminated with: auto

This just adds the new data to the table along with all the previous data. Is there a setting I am missing, or a Method I can use?

Thank you

有帮助吗?

解决方案

Truncate & then load again!!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top