我的数组 print_r 是:
Array
(
[email] => xxx@cs.caddmu.edu
[attempt] => 0
[timestamp] => 1369676665
[smtp-id] => <1369676650.51a39b6a76cec@www.openaccesspub.org>
[response] => 451 4.2.0 Temporarily Grey listed. Try again in a couple of minutes
[category] => Invitation
[event] => deferred
)
Array
(
[email] => reidsdds@cs.cdsmu.edu
[timestamp] => 1369676845
[smtp-id] => <1369676650.51a39b6a76cec@www.openaccesspub.org>
[response] => 250 2.0.0 r4RHlOGH017661 Message accepted for delivery
[category] => Invitation
[event] => delivered
)
Array
(
[email] => jrai@openhh.com
[timestamp] => 1369678994
[smtp-id] => <1369678990.51a3a48e93428@ohhpb.org>
[category] => Reviewers
[event] => processed
)
Array
(
[email] => sss@lusst.fi
[timestamp] => 1369678997
[smtp-id] => <1369678990.51a3a48e93428@oub.org>
[response] => 250 2.0.0 Ok: queued as 02C103F0454
[category] => Revie
[event] => delivered
)
表格有这些行:
event_id、事件、电子邮件、类别、时间戳、响应、尝试、url、状态、原因、类型、操作、m_id。
我正在尝试使用以下内容插入 mysql 表:-
foreach ($temp_array as $key => $poke)
{
mysql_query ("INSERT INTO temp_array (email,timestamp,category,event,response,attempt,reason,o_id,operator,action,...)VALUES ('$poke[email]','$poke[timestamp]','$poke[category]','$poke[event]',.... )" );
}
但我收到错误“未定义索引:类别在
C:\xampp\htdocs\eembeta\array_temp.php on line 34
如何插入没有特定顺序的数据?