This topic is locked

Import Event - Replace or Append option

1/22/2010 5:09:11 PM
PHPRunner General questions
A
acpan author

Hi,
I saw the long awaited import event in latest version 5.2 (Thank you so much).

Suggest to have also a check box to tick, replace or append,

beside the browse for file button(Currently is append).
This will make the feature complete.
Thanks

acpan

J
Jane 1/25/2010

Hi,
PHPRunner adds new records from imported file if primary key values are not exist in the database and replace data for existing key values.

A
acpan author 1/25/2010



Hi,
PHPRunner adds new records from imported file if primary key values are not exist in the database and replace data for existing key values.


Hi Jane, Thanks for your reply.

However, often we have many records (eg. 10,000) in the table,

and if user need to do a clean upload, then he need to delete records

page by page first eg, 200 pages. This is a lot of work.
So what i meant was, if user selects a check box (eg. delete all before upload) at the import page,

  1. then the script will execute "Delete from table_name where condition_in_before_process_event)
  2. In before process event, we can put $strWhere = " client_id = ".$_SESSION["UserID"]

    so that other user's record will not be deleted;
    At the moment there is no option to add a checkbox on the import page thus we can't pre-process the event.
    Thanks for your consideration.
    acpan

J
Jane 1/26/2010

Thank you for sharing your idea.

We'll add it to our suggestion list.