|
 |
|
ต้องการแสดงข้อมูลที่ insert หลาย Record ทำไงค่ะ ตอนที่ insert insert แบบหลาย Record ค่ะ |
|
 |
|
|
 |
 |
|
งงคำถามครับ ช้าๆ ชัดๆ เคลียร์ๆ
|
 |
 |
 |
 |
Date :
2009-07-22 17:39:01 |
By :
lozomac |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<?php
$values = array();
while($row = mysql_fetch_array($db_query1)){
array_push($values,"('" . $row["value1"] . "', '" . $row["value2"] . "', '" . $row["value3"] . "')")
query!!!
}
if(count($values) > 0){
$sql = "insert into (field1, field2, field2) value " . implode(", "$values)
mysql_query($sql);
}
?>
แบบนี้หรือเปล่าที่ต้องการ เดาสุ่มไปงั้นแหละ
|
 |
 |
 |
 |
Date :
2009-07-22 21:14:05 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|