Browse Source

fleat:update table name

igb 4 weeks ago
parent
commit
f584d5e394
6 changed files with 12 additions and 12 deletions
  1. 4 4
      customerSave.php
  2. 2 2
      customersNew.php
  3. 1 1
      dashboard_search.php
  4. 2 2
      silentCustomer.php
  5. 2 2
      subCustomers.php
  6. 1 1
      tag.php

+ 4 - 4
customerSave.php

@@ -104,7 +104,7 @@ $act = empty($id) || !is_numeric($id) ? 'addSave' : 'editSave';
 
 if ($act === 'editSave') {
     // Verify customer ownership
-    $stmt = $conn->prepare("SELECT cs_belong FROM Customer WHERE id = ?");
+    $stmt = $conn->prepare("SELECT cs_belong FROM customer WHERE id = ?");
     $stmt->bind_param("i", $id);
     $stmt->execute();
     $result = $stmt->get_result();
@@ -127,7 +127,7 @@ if (empty($cs_code)) {
 }
 
 // Check for duplicate customer information
-$checkStr = "SELECT * FROM Customer WHERE cs_belong != " . $_SESSION['employee_id'] . " AND (id = 0 ";
+$checkStr = "SELECT * FROM customer WHERE cs_belong != " . $_SESSION['employee_id'] . " AND (id = 0 ";
 
 $Dupli = "";
 
@@ -219,7 +219,7 @@ if ($act == "editSave" || $allowedit == 1) {
                "&fliterDeal=" . $fliterDeal . "&Page=" . $page;
     
     // 直接使用SQL拼接,与ASP版本保持一致
-    $updateSql = "UPDATE Customer SET 
+    $updateSql = "UPDATE customer SET 
         cs_code='" . $conn->real_escape_string($cs_code) . "',
         cs_company='" . $conn->real_escape_string($cs_company) . "',
         cs_name='" . $conn->real_escape_string($cs_name) . "',
@@ -267,7 +267,7 @@ if ($act == "editSave" || $allowedit == 1) {
     echo "<script>location.href='$hrefstr';</script>";
 } else {
     // Insert new customer using direct SQL
-    $insertSql = "INSERT INTO Customer (
+    $insertSql = "INSERT INTO customer (
         cs_code, cs_company, cs_name, cs_country, cs_from, cs_tel, cs_wechat, 
         cs_whatsapp, cs_email, cs_linkedin, cs_facebook, cs_alibaba, cs_address,
         cs_telBu, cs_wechatBu, cs_whatsappBu, cs_emailBu, cs_linkedinBu, 

+ 2 - 2
customersNew.php

@@ -43,10 +43,10 @@ if ($act == "postchk") {
             case "0":
             case "1":
             case "2":
-                $sqlStr = "UPDATE Customer SET cs_deal=" . $chkact . $sqlStr;
+                $sqlStr = "UPDATE customer SET cs_deal=" . $chkact . $sqlStr;
                 break;
             default:
-                $sqlStr = "UPDATE Customer SET cs_belong=" . str_replace("t", "", $chkact) . $sqlStr;
+                $sqlStr = "UPDATE customer SET cs_belong=" . str_replace("t", "", $chkact) . $sqlStr;
         }
         
         $conn->query($sqlStr);

+ 1 - 1
dashboard_search.php

@@ -22,7 +22,7 @@
 
 <div id="man_zone">
     <div class="searchForm homeSearch">
-        <form method="post" action="/searchResult.asp"  accept-charset="UTF-8">
+        <form method="post" action="/searchResult.php"  accept-charset="UTF-8">
             <input class="keywords " id="keyword" name="keywords" placeholder="请输入联系人 / 电话 / 邮箱 / 微信 / WhatsApp.."  >
             <input class="searchSubmit" type="submit" value="客户检索">
         </form>

+ 2 - 2
silentCustomer.php

@@ -20,11 +20,11 @@ if ($act == 'postchk') {
         case "0":
         case "1":
         case "2":
-            $sqlStr = "UPDATE Customer SET cs_deal=" . (int)$chkact . $sqlStr;
+            $sqlStr = "UPDATE customer SET cs_deal=" . (int)$chkact . $sqlStr;
             break;
         default:
             $chkact = str_replace('t', '', $chkact);
-            $sqlStr = "UPDATE Customer SET cs_belong=" . (int)$chkact . $sqlStr;
+            $sqlStr = "UPDATE customer SET cs_belong=" . (int)$chkact . $sqlStr;
     }
     
     $conn->query($sqlStr);

+ 2 - 2
subCustomers.php

@@ -13,9 +13,9 @@ if ($act == 'postchk') {
         $sqlStr = "(" . implode(',', array_map('intval', (array)$_POST['chkbox'])) . ")";
         
         if ($chkact == '0') {
-            $sql = "UPDATE Customer SET cs_deal=" . (int)$chkact . " WHERE id IN " . $sqlStr;
+            $sql = "UPDATE customer SET cs_deal=" . (int)$chkact . " WHERE id IN " . $sqlStr;
         } else {
-            $sql = "UPDATE Customer SET 
+            $sql = "UPDATE customer SET 
                     cs_code=REPLACE(cs_code, '-', '/0'+(SELECT SUBSTRING(em_code,2,2) FROM employee WHERE id=" . (int)$chkact . ")+'-'), 
                     cs_belong=" . (int)$chkact . ", 
                     cs_chain=CONCAT(cs_chain,'," . (int)$chkact . "') 

+ 1 - 1
tag.php

@@ -16,7 +16,7 @@ if ($act == 'postchk') {
 
     if (isset($_POST['chkbox'])) {
         $sqlStr = "(" . implode(',', array_map('intval', (array)$_POST['chkbox'])) . ")";
-        $updateStr = "UPDATE Customer SET 
+        $updateStr = "UPDATE customer SET 
                      cs_updatetime='" . date('Y-m-d H:i:s') . "',
                      cs_code=REPLACE(cs_code, '-', '/' + (SELECT em_code FROM employee WHERE id=" . (int)$chkact . ") + '-'),
                      cs_belong=" . (int)$chkact . ",