【发布时间】:2018-11-13 16:52:38
【问题描述】:
我是 Web 开发的新手我有 HTML 网页,它从数据库中检索数据并根据数据显示信息我想每秒检索数据而不使网页闪烁请将其应用于以下代码,因为我没有了解如何使用以前的解决方案应用它。
<style>
.containerdiv { float: left; position: relative; }
body { background-color: #99BD91;}
.content {margin: auto;}
</style>
<div class="containerdiv" style="width:100%;" >
<img src="paaa.jpg" style="width:100%"; >
<?php
$result = mysql_query("SELECT data FROM `data1`");
$storeArray = Array();
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$storeArray[] = $row['value']; } // retrive data from database and store it in array
?>
</div>
【问题讨论】:
-
1) 你真的需要找一个更新的教程;
mysql_扩展实际上已经死了(将在 12 月 31 日到来)。 2)AJAX。
标签: javascript php html mysql ajax