 |
ทำไมอัพเดทข้อมูลไม่ได้ ช่วยดูให้ด้วยค่ะ อัพเดท firtname และ lastname ไม่ได้ค่ะแต่ว่าสามารถอัพเดท userneme กับ password |
|
 |
|
|
 |
 |
|
อัพเดท firtname และ lastname ไม่ได้ค่ะ
แต่ว่าสามารถอัพเดท userneme กับ password ได้นะคะ
ไม่รู้ว่าเป็นเพราะอะไร
ในฐานข้อมูลให้ firtname และ lastname เป็น varchar 30 เก็บในตาราง clients
username กับ password เป็น varchar 15 เก็บในตาราง users
ให้ user_id เป็น คีย์นอก ค่ะ
<?php require_once('../Connections/con_wbi.php'); ?>
<?php include ('config_clients.php'); ?>
<?php
mysql_select_db($database_con_wbi, $con_wbi);
$query_rsEdit = "SELECT * FROM clients, users WHERE clients.user_id=users.user_id and users.user_id = '$user_id'";
$rsEdit = mysql_query($query_rsEdit, $con_wbi) or die(mysql_error());
$row_rsEdit = mysql_fetch_assoc($rsEdit);
$totalRows_rsEdit = mysql_num_rows($rsEdit);
?>
//update table users
mysql_select_db($database_con_wbi, $con_wbi);
$UpUser= "update users set username='$username' ,password='$password',ques_forget='$ques_forget',ans_forget='$ans_forget' where user_id=$user_id";
$rsUpUser= mysql_query($UpUser, $con_wbi) or die(mysql_error());
//update table clients
mysql_select_db($database_con_wbi, $con_wbi);
$UpClients= "update clients set firstname='$firstname' ,lastname='$lastname',email='$email',addr='$addr' where user_id=$user_id";
$rsUpClients= mysql_query($UpClients, $con_wbi) or die(mysql_error());
เด็กโง่
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
25 ม.ค. 2551 12:16:49 |
By :
sanny |
View :
1424 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
mysql_select_db($database_con_wbi, $con_wbi);
$UpClients= "update clients set firstname='$firstname' ,lastname='$lastname',email='$email',addr='$addr' where user_id='$user_id'";
|
 |
 |
 |
 |
Date :
25 ม.ค. 2551 14:12:31 |
By :
hobbits |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณคุณ hobbits นะคะ
|
 |
 |
 |
 |
Date :
25 ม.ค. 2551 14:17:26 |
By :
sanny |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
มันยัง update ไม่ได้ค่ะ

|
 |
 |
 |
 |
Date :
25 ม.ค. 2551 14:24:53 |
By :
sanny |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ส่งออกฐานข้อมูลมพร้อมโค้ดมา [email protected]
|
 |
 |
 |
 |
Date :
29 ม.ค. 2551 11:46:37 |
By :
takumis |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|