数据库

位置:IT落伍者 >> 数据库 >> 浏览文章

从一个MySQL的例子来学习查询语句[2]


发布日期:2022年08月14日
 
从一个MySQL的例子来学习查询语句[2]
$image_count=

if($count_len<

{for($j=;$j<$count_len;$j++)

{$image_count=$image_count<ccid_file values= src=gif />

}

}

for($i=;$i<$count_len;$i++)

{

$nom=substr($str_count$i

$image_count = $image_count<ccid_file values=

$image_count = $image_count

$image_count = $image_countgif />

}

echo$image_count<br>

print这是你的第$sum次访问

>

从上面的一个小小的计数器例子来看已经包括了查询插入修改的知识可以实现功能记录每一个IP的访问量及总的访问次数总量不支刷新

查询

SELECT被用来检索从一个或多个表中精选的行select_expression指出你想要检索的列SELECT也可以用来检索不引用任何表的计算行

select*from table;

select fieldfield from table;

select count(*)from table;

select tablefiledtablefiled from tabletable where tablefield=valed;

select *from table where field=valed and fiels=valed orded by field;

select*from table where filed=valed order byfiled desc linit n;

[] [] []

               

上一篇:从一个MySQL的例子来学习查询语句[3]

下一篇:从一个MySQL的例子来学习查询语句[1]