 |
|
ต้องการแทนที่จำนวนใหม่ในฐานข้อมูล tb_bring และ insert ข้อมูลลงตาราง tb_bringwant (ข้อมูลหลาย 5 ตัวในทีเดียว)
แต่มัน error แบบนี้ Parse error: parse error, unexpected T_ELSE in c:\appserv\www\zzzassbringbring1.php on line 510 งงมากมายจ้า
<?
$txtKeyword=$_GET[txtKeyword];
$count=0;
include "connect.php";
$sql="select * from tb_bring where idbring='$txtKeyword'";
//echo"$sql";
$result=mysql_db_query($dbname,$sql);
while($record=mysql_fetch_array($result))
{
if($itemp <"0" or $itemp1 <"0" or $itemp2 <"0" or $itemp3 <"0" or $itemp4 <"0"){
echo "<div align='center' class='style12'> กรุณากรอกจำนวนให้เพียงพอสำหรับการเบิก";
}
if($itemp >=0 or $itemp1 >=0 or $itemp2 >=0 or $itemp3 >=0 or $itemp4 >=0){
$sql="Update tb_bring set amount='$itemp' WHERE idbring='$txtKeyword'";
$sql="Update tb_bring set amount='$itemp1' WHERE idbring='$txtKeyword1'";
$sql="Update tb_bring set amount='$itemp2' WHERE idbring='$txtKeyword2'";
$sql="Update tb_bring set amount='$itemp3' WHERE idbring='$txtKeyword3'";
$sql="Update tb_bring set amount='$itemp4' WHERE idbring='$txtKeyword4'";
echo"$sql";
}
$result = mysql_query($sql)
else($itemp >="0" or $itemp1 >="0" or $itemp2 >="0" or $itemp3 >="0" or $itemp4 >="0"){
$sql = "Insert into tb_bringwant(idbringwant ,amountwant,bringproject,bringusername,bringdate)values('$txtKeyword','$amountwant','$project','$bringname','$bringdate')";
$sql = "Insert into tb_bringwant(idbringwant ,amountwant,bringproject,bringusername,bringdate)values('$txtKeyword1','$amountwant1','$project1','$bringname','$bringdate')";
$sql = "Insert into tb_bringwant(idbringwant ,amountwant,bringproject,bringusername,bringdate)values('$txtKeyword2','$amountwant2','$project2','$bringname','$bringdate')";
$sql = "Insert into tb_bringwant(idbringwant ,amountwant,bringproject,bringusername,bringdate)values('$txtKeyword3','$amountwant3','$project3','$bringname','$bringdate')";
$sql = "Insert into tb_bringwant(idbringwant ,amountwant,bringproject,bringusername,bringdate)values('$txtKeyword4','$amountwant4','$project4','$bringname','$bringdate')";
}
$result = mysql_query($sql);
if ($result)
{
mysql_close($link);
}
}
?>
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
2010-05-25 13:02:56 |
By :
เตาะแตะ |
View :
885 |
Reply :
6 |
|
 |
 |
 |
 |
|
|
|
 |