This topic is locked

import function - how to drop records before importing

12/3/2008 5:11:55 PM
PHPRunner General questions
Allenh author

We are using the import function to allow clients to update their database - the problem is that import adds to the existing records - is there anyway to 'drop' or 'replace' the existing records prior to importing?
Thank you for a great product.
Allen.

J
Jane 12/4/2008

Allen,
please make sure key values are not the same in the table and in the imported file.

Allenh author 12/4/2008

We tested this a couple of different ways;

  1. the id field is set to auto increment so we've tried not including this field in the import, and the server correctly creates and adds new records - but the list then is the 'old' and the 'recent import'
  2. include the id field in the import file, made sure that the numbers in import id were unique to records currently online, and again, the 'import' gets added to the list'
    But we figured it out, all the client has to do is 'delete all records' before the import. It's all there and it works great.

    thank you for your help.

    Allen.
    Allen,

    please make sure key values are not the same in the table and in the imported file.