Exporting - PhenoApps/Inventory GitHub Wiki

Inventory's export to .csv feature produces a file similar to the following:

box_id,seed_id,inventory_date,inventory_person,weight_gram
A,23,2017-04-12-01-30-09,Peter_Rosario,null
A,24,2017-04-12-01-30-14,Peter_Rosario,1.23
A,25,2017-04-12-01-30-16,Peter_Rosario,null

Inventory's export to .sql feature assumes the existence of a table named seedinv described by the entity-relationship diagram to the right.

This export feature produces a file similar to the following:

DELETE FROM seedinv WHERE seedinv.box_id in ('','A');
INSERT INTO seedinv(`box_id`,`seed_id`,`inventory_date`,`inventory_person`,`weight_gram`)
VALUES('A','23','2017-04-05-11-12-41','Peter_Rosario',null),
('A','25','2017-04-05-11-13-00','Peter_Rosario','1.23'),
('A','27','2017-04-05-11-13-05','Peter_Rosario',null);