如何克服数据存储为0而不是原始数据的情况

时间:2013-07-27 04:56:41

标签: php html mysql

我在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);

0 个答案:

没有答案