比方說,我想插入這樣的數據:一個查詢插入多行多列
Row 1: People = '40', Places = '15'
Row 2: People = '5', Places = '10'
我明白,這是你將怎樣執行上面:
mysql_query("INSERT INTO mytable(`People`, `Places`)
VALUES ('40', '15'),('5', '10')");
但什麼如果我想用一個查詢插入兩個以上的列?如果要插入的數據是這樣的:
Row 1: People = '40', Places = '15'
Row 2: People = '5', Places = '10'
Row 3: Things = '140', Ideas = '20'
Row 4: People = '10', Things = '5', Ideas = '13'
我似乎無法在其他地方找到這樣的問題。
我想你不能用一個查詢做到這一點! – Anji 2012-04-23 19:05:17