|
 |
|
เกี่ยวกับ session ครับ แบบนี้ทำไงอะครับ ประมาณว่า ตร $p_price อะครับ ถ้ามันเช็คแล้วมันเท่ากับ 0 เราจะเอาค่า 0 ไปลงใน ดาต้าเบสครับ |
|
 |
|
|
 |
 |
|
$index1=count($_SESSION['cart_skin']['p_code']);
for($i=0; $i<$index1; $i++){
$p_code=$_SESSION['cart_skin']['p_code'][$i];
$p_type=$_SESSION['cart_skin']['p_type'][$i];
if($p_type=="PA") {
include('connect.php');
$sqlpa="Select * From tbl_pack where p_code='$p_codep '";
$dbquerypa=mysql_db_query($dbname,$sqlpa);
$resultpa= mysql_fetch_array($dbquerypa);
$p_status=$resultpa[p_status];
if ($p_status>="1") { $p_price="0"; }
else {
$p_price=$_SESSION['cart_skin']['p_price'][$i];
}
} else {
$p_price=$_SESSION['cart_skin']['p_price'][$i];
}
$sql1 = "insert into tbl_taxinv (cus_code,tax_no,p_code,p_type,p_name,p_price,qty,tax_date,p_disc,staff_code,staff_code1,staff_code2,staff_code3,p_mount,tax_status,staff_cash) values ('$cus_code','$order_no','$p_code','$p_type','$p_name','$p_price','$qty','$date_order','$p_disc','$staff_code','$staff_code1','$staff_code2','$staff_code3','$m','1','$staff_code_st') ";
mysql_query($sql1) or die(mysql_error());
ประมาณว่า ตร $p_price อะครับ ถ้ามันเช็คแล้วมันเท่ากับ 0 เราจะเอาค่า 0 ไปลงใน ดาต้าเบสครับ ต้องเพิ่มตรงไหนครับ เริ่มปวดหัวล่ะ
ขอบคุณครับ
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2010-02-25 21:54:29 |
By :
ddsiam |
View :
867 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ว๊า.... เงียบเลยครับ
|
 |
 |
 |
 |
Date :
2010-02-25 22:29:48 |
By :
ddsiam |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|