我已经用 php 构建了一个小型 web 表单,我可以从 mysql db 更新和插入一些数据。表单预先填充了数据库中的数据......到目前为止一切正常......问题是当我重新加载表单时,我从数据库接收到旧数据......但是当我正在查看数据库时更新/新数据在那里...实际上我没有在网页中使用任何缓存...不知道该怎么办???
...
if(isset($_REQUEST['createTranslationSet']) && (!empty($id)) ) {
$connect = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
$mysqli->autocommit(false);
$mysqli = $connect->prepare("INSERT INTO `translation-ids`(`ID`) VALUES (NULL)");
$mysqli->execute();
$l10id = $mysqli->insert_id;
$mysqli = $connect->prepare("UPDATE places SET places.translationID = ? WHERE places.id = ?");
$mysqli->bind_param('ii', $l10id, $id);
$mysqli->execute();
$mysqli = $connect->prepare("SELECT * FROM places WHERE places.id = ?");
$mysqli->bind_param('i', $id);
$mysqli->execute();
$mysqli->fetch();
echo ($translationID);