1
私はa,b,c,d,e
の形でhash
のシリーズを持っていると私は、次の配列から複数のmySQL挿入を作成するには?
$hashes = array();
while(($row = mysql_fetch_assoc($sql))) {
$hashes[] = $row['hash'];
}
$_SESSION['hashes'] = implode(',', $hashes); // a,b,c,d,e
を通じてそれを行う私の質問は、私は以下のように複数のインサートを追加する方法ですか?
INSERT INTO alerts_data (alerts_data_id, alerts_data_hash)
VALUES
('$last insert id', 'hash 1'),
('$last insert id', 'hash 2')
('$last insert id', 'hash 3')