i have one csv file which contains library group and it’s data…
group consider as sheet and for each sheet contains phrase name and phrase value…
I want to insert this csv data to two different table using mysql how can i ?
suppose i have 2 table like
phrase_library_group
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| GROUP_ID | bigint(20) | NO | PRI | NULL | auto_increment |
| GROUP_NAME | varchar(100) | NO | | NULL | |
| ------------+--------------+------+-----+---------+----------------+
phrase_list
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| PHRASE_ID | bigint(20) | NO | PRI | NULL | auto_increment |
| PHRASE_NAME | varchar(100) | NO | | NULL | |
| PHRASE_DESC | varchar(500) | NO | | NULL | |
| GROUP_ID | bigint(20) | NO | MUL | NULL | |
| ------------+--------------+------+-----+---------+----------------+
here in image Additional_meds/Antibiotic Warnings/… are groups
and each group contains different phrases..like Additional_meds contains total 12 records as see below.
csv like 
Do it natively in MySQL, this should be much faster and consume less ressources.
Create a table in MySQL containing all fields from your CSV, i.e.
load data from CSV into this table via
LOAD INFILEstatement inside MySQL, i.e.After that you can split your data with two
INSERTstatements.