Pergunta

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

Foi útil?

Solução

Truncate & then load again!!

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top