新增/修改活塞資料

  

× Avatar

選擇 PISTON

'localhost', 'user' => 'root', 'password' => 'piston85721649', 'database' => 'cs_ai2025' ]; $conn = new mysqli( $DB_CONFIG['host'], $DB_CONFIG['user'], $DB_CONFIG['password'], $DB_CONFIG['database'] ); $id_input=$_post['id_input'] ?? ''; if ($conn->connect_error) { die("❌ 資料庫連線失敗:" . $conn->connect_error); } $stmt = $conn->prepare("SELECT * FROM PISTON WHERE ID = ? "); $stmt->bind_param("s", $id_input); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $id = $row['id'] ?? ''; $bore = $row['bore'] ?? ''; $crown_height = $row['crown_height'] ?? ''; $skirt_length = $row['skirt_length'] ?? ''; $pin_diameter = $row['pin_diameter'] ?? ''; $ring_count = $row['ring_count'] ?? ''; $ring_width = $row['ring_width'] ?? ''; $ring_depth = $row['ring_depth'] ?? ''; $ring_first_z = $row['ring_first_z'] ?? ''; $ring_spacing = $row['ring_spacing'] ?? ''; $dish_type = $row['dish_type'] ?? ''; $dish_diameter = $row['dish_diameter'] ?? ''; $dish_depth = $row['dish_depth'] ?? ''; $wall_thickness = $row['wall_thickness'] ?? ''; $crown_thickness = $row['crown_thickness'] ?? ''; $material = $row['material'] ?? ''; $heat_treat = $row['heat_treat'] ?? ''; $hardness_hrb = $row['hardness_hrb'] ?? null; $diameter = $row['diameter'] ?? 0; $length = $row['length'] ?? 0; $pin_hole_diameter = $row['pin_hole_diameter'] ?? 0; $ring_groove_1_width = $row['ring_groove_1_width'] ?? 0; $ring_groove_1_depth = $row['ring_groove_1_depth'] ?? 0; }} ?>