的情况是是否可以使用多维数组插入记录?
我想插入这样的记录:
首先,我的数据字段我需要插入
$field = Array ([0] => Email [1] => Name)
其次什么数组,我有一个数组邮件
$mail = Array ([0] => [email protected] [1] => [email protected])
最后,我有一个多维度阵列上,名称,
$set = Array ([1] => Array ([1] => leo [4] => NULL))
但是,它可以是多个字段,例如 。它也可以有手机的领域(以及地址,geneder ...等等),那么这将是:
$field = Array ([0] => Email [1] => Name [2] => Phone)
$set = Array ([1] => Array ([1] => leo [4] => NULL) [5] => Array ([1] => 4343343 [4] => 3453343))
的问题是,如何在这样的场景中插入? : 查询应该是这样的
$query="INSERT INTO subscriber (Email,Name,Phone) VALUES ($mail[] , $set[][], $set[][])";