数据库模糊查询like语句:
$sql = "select * from table where title like '%中国%'";
//包含“中国”两个字
$sql = "select * from table where title like '中国%'"; //以“中国”开头
$sql = "select * from table where title like '%中国'"; //以“中国”结尾
$sql = "select * from table where title like '[ALN]%'";
//以A、L、N开头
$sql = "select * from table where title like
'%[ALN]'
";
//
以A、L、N结尾
$sql = "select * from table where title like '
[!ALN]%
'
";
//不
以A、L、N开头
in语句:
$sql = "select * from table where name in ('张','梁'); //获取name等于“张”或者“梁”的信息
mysql_num_rows() //获取结果集中行的数
ceil() //向上取整数
floor() //向下取整数