php+mysql: insert a php array into mysql

后端 未结 4 599
时光取名叫无心
时光取名叫无心 2020-12-22 07:54

I have an array with 30000 plus entries that need to go into a MySQL table.

What is the best practice? From here? Lets say [0], [1] and [2] in the database would be

4条回答
  •  Happy的楠姐
    2020-12-22 08:18

    Magic function? I'm guessing you mean some sort of DB abstraction layer? IMHO that would just double your work.

    Just build the query manually looping through array[] INSERT'ing values as you go.

提交回复
热议问题