运行MYSQL.EXE
mysql> create database counter;
Query OK, 1 row affected (0.10 sec)
mysql> use counter;
Database changed
mysql> create table tl(id integer(2),count integer(5));
Query OK, 0 rows affected (0.21 sec)
mysql> show columns from tl;
+-------+--------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------+------+-----+---------+-------+
| id | int(2) | YES | | NULL | |
| count | int(5) | YES | | NULL | |
+-------+--------+------+-----+---------+-------+
2 rows in set (0.05 sec)
mysql> select * from tl;
Empty set (0.08 sec)
mysql> insert into tl(id,count) values(1,1);
Query OK, 1 row affected (0.02 sec)
mysql> select * from tl;
+------+-------+
| id | count |
+------+-------+
| 1 | 1 |
+------+-------+
1 row in set (0.03 sec)
下面编写HTML文件内容:
<html>
<body>
<?php
$myvar = "来访人数:";
echo $myvar;
?>
<?php
mysql_connect() or die("there are problems to connect to mysql!");
$query="select * from tl";
$result=mysql_db_query("counter",$query);
if($result){
$r=mysql_fetch_array($result);
$counter=$r["count"];
$counter=$counter+1;
echo $counter;
$query="update tl set count='$counter' where id=1";
$result=mysql_db_query("counter",$query);
mysql_close();
}
?>
</body>
</html>
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
更新日志
- 南合文斗.2007-陪君醉笑三千尘鸟人唱片】【FLAC+CUE】
- 群星《我们的歌第六季 第1期》[320K/MP3][90.72MB]
- 群星《我们的歌第六季 第1期》[FLAC/分轨][456.01MB]
- 李雨寰《Break Free》[320K/MP3][98.39MB]
- 草蜢.2001-《真经典》环球唱片[WAV+CUE]
- 群星.2009-第4届2008十大发烧唱片精选[FLAC+CUE]
- 丁红《女儿情》[DTS-WAV]
- 陈惠婷.2017-Voyager3【亚神音乐】【FLAC分轨】
- 群星.2001-华纳歌声魅影【华纳】【WAV+CUE】
- 张雨生.2016-雨后星空2CD【丰华】【WAV+CUE】
- 李雨寰《Break Free》[FLAC/分轨][533MB]
- 廖也欧《面朝大海》[320K/MP3][18.35MB]
- 廖也欧《面朝大海》[Hi-Res][24bit 48kHz][FLAC/分轨][170.14MB]
- s13T1夺冠五人名单都有谁 s13T1夺冠五人名单一览
- 英雄联盟T1战队队长都有谁 T1战队所有队长介绍