|
|
|
php รบกวนดูโค๊ด แก้ไขตาราง mysql ให้หน่อยครับหน่อยครับ UPDATE tb_antivirus_protection ...where.... |
|
|
|
|
|
|
|
Code (PHP)
<?php
$host = "localhost";
$un = "root";
$pw = "root";
$myconn = mysql_connect($host,$un,$pw);
if($myconn){
$charset = "SET NAMES tis620";
mysql_query($charset);
$d1 = $_POST[proid];
$d2 = $_POST[proname];
$d3 = $_POST[prolanguage];
$d4 = $_POST[prosystem];
$d5 = $_POST[prooriginalprice ];
$d6 = $_POST[prosaleprice];
$d7 = $_POST[proimg];
$strsql = "UPDATE tb_antivirus_protection (proid,proname,prolanguage,prosystem,prooriginalprice,prosaleprice,proimg) VALUES('$d1','$d2','$d3','$d4','$d5','$d6','$d7')";
$dbname = "allsoftcomdb";
$result = mysql_db_query($dbname,$strsql,$myconn);
$affectedrws = mysql_affected_rows();
if($affectedrws>0){
echo "à¾ÔèÁ¢éÍÁÙÅàÃÕºÃéÍÂáÅéÇ<br>";
echo "<A href='ShowAntivirus & Protection.php'>¡ÅѺä»Âѧ˹éÒáá</A><br><br>";
}else{
echo "Error : ".mysql_error();
}
}else{
}
?>
Tag : PHP, MySQL, CakePHP
|
|
|
|
|
|
Date :
2010-09-27 02:47:13 |
By :
Neptune29 |
View :
800 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UPDATE table_name SET column_name = new_value
WHERE column_name = some_value ไม่ช่ายหรอครับ
แต่ ที่นายทำ ไม่มีเงื่อนไข
|
|
|
|
|
Date :
2010-09-27 02:56:30 |
By :
ฮานามิ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
$strsql = "UPDATE tb_antivirus_protection SET(proid,proname,prolanguage,prosystem,prooriginalprice,prosaleprice,proimg)
VALUES('$d1','$d2','$d3','$d4','$d5','$d6','$d7') WHERE (proid,proname,prolanguage,prosystem,prooriginalprice,prosaleprice,proimg) = VALUES('$d1','$d2','$d3','$d4','$d5','$d6','$d7')" ;
แบบนี้รึเปล่าครับ
|
ประวัติการแก้ไข 2010-09-27 03:11:01
|
|
|
|
Date :
2010-09-27 03:10:15 |
By :
Neptune29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|