我在 mysql 数据库中创建了一张十进制数据类型的表。当我想存储一些数据时,它只存储为 0。我尝试通过更改数据类型但没有结果。我包括 php 代码的部分
$que_sgpdetails = "INSERT INTO sgpa_details ( usn, sem_I, sem_II, sem_III, sem_IV, sem_V, sem_VI, sem_VII, sem_VIII ) VALUES ( :usn, :sem_I, :sem_II, :sem_III, :sem_IV, :sem_V, :sem_VI, :sem_VII, :sem_VIII )";
$query_params5 = array( ':usn' => $_POST['usn'], ':sem_I' => $_POST['sem_I'], ':sem_II' => $_POST['sem_II'], ':sem_III' => $_POST['sem_III'], ':sem_IV' => $_POST['sem_IV'], ':sem_V' => $_POST['sem_V'], ':sem_VI' => $_POST['sem_VI'], ':sem_VII' => $_POST['sem_VII'], ':sem_VIII' => $_POST['sem_VIII'] );
$statement5 = $db->prepare($que_sgpdetails);
$result5 = $statement5->execute($query_params5);