  | 
		 		   | 
	  	    
          
            
			
	
			
			 
                รูปที่1หน้ารายการฝาก 
  
รูปที่2หน้าระบบรับฝาก 
  
รูปที่3database รายการฝาก 
  
  
 
คือผมต้องการให้จำนวนเงินฝากใหม่od_daposit  มา Update ในช่องจำนวนเงินฝากทั้งหมดod_balance ของแต่ละรหัสd_idครับ 
Codeหน้าระบบรับฝาก (PHP) 
<?php require_once('Connections/satcha.php'); ?>
<?php require_once('Connections/connections.php'); ?>
<?php
date_default_timezone_set('Asia/Bangkok');
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
$now = (date("Y") + 543) . date("-m-d");
$time = date("G:i:s"); //เผื่ออยากใส่วันเวลาคนละช่อง
$status = ("1");
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO order_deposit (d_id, od_lastdate,op_time, od_daposit ,d_status) VALUES ('$d_id','$od_lastdate','$time','$od_daposit','$status')");
  mysql_select_db($database_satcha, $satcha);
  $Result1 = mysql_query($insertSQL, $satcha) or die(mysql_error());
  $insertGoTo = "deposit.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_connections, $connections);
mysql_query("SET NAMES UTF8");
$query_satcha = "SELECT * FROM member";
$satcha = mysql_query($query_satcha, $connections) or die(mysql_error());
$row_satcha = mysql_fetch_assoc($satcha);
$totalRows_satcha = mysql_num_rows($satcha);
?>
 
 
  Tag : PHP               
                        | 
           
          
            
		
  ประวัติการแก้ไข 2015-06-03 21:59:11	
                             | 
           
          
            
              
                   | 
                   | 
                   | 
               
              
                   | 
                
                    
                      | Date :
                          2015-06-03 21:49:03 | 
                      By :
                          Alzheimertzz | 
                      View :
                          2654 | 
                      Reply :
                          4 | 
                     
                  | 
                   | 
               
              
                   | 
                   | 
                   | 
               
              | 
           
          
            | 
			 | 
           
         
	    
		             | 
		
			  |