|
 |
|
สอบถามการเก็บข้อมูล 2 ตารางครับ คือผมทำระบบสมัครสมาชิก ซึ่ง จะเก็บไว้ใน ตาราง MEMBER |
|
 |
|
|
 |
 |
|
$sql = "CREATE TABLE IF NOT EXISTS MEMBER2 SELECT * FROM MEMBER";
อันนี้เป็นคำสั่งก๊อบปี้ข้อมูลของ ฐานข้อมูลนะครับ
|
 |
 |
 |
 |
Date :
2009-09-03 01:49:07 |
By :
deawx |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แบบลงทะเบียนแล้วเก็บชื่อลงสองตารางหรอ เป็นผมจะทำfunction แล้วคิวนี่ลง2ฐานอะ
|
 |
 |
 |
 |
Date :
2009-09-03 04:38:20 |
By :
sakang |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมก็ยังงง อยู่อะครับ
ยังไง ขออีกความเห็นนะครับ
|
 |
 |
 |
 |
Date :
2009-09-03 18:29:00 |
By :
comsueksa |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
บันทึกพร้อมกัน 2 ตารางไปเลยครับ
Code (PHP)
<?php
$username=$_POST['username'];
$password=$_POST['password'];
$name=$_POST['name'];
$email=$_POST['email'];
//function ตรวจสอบค่าต่างๆตามต้องการ
$sql_u1="Insert into member values('','$username','$password','$name','$email')";
mysql_query($sql_u1);
$sql_u2="Insert into member2 values('','$username','$password','$name','$email')";
msyql_query($sql_u2);
echo"<script language='javascript'>laert('สมัครสมาชิกเรียบร้อยแล้ว !');window.location='xxxxx.php'</script>";
?>
แบบนี้มันจะได้เปล่าหว่า ลองดูอ่ะครับผมก้ไม่เคยลองอ่ะครับ
|
 |
 |
 |
 |
Date :
2009-09-03 18:50:15 |
By :
somparn |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|