
有个empty()函数可以判坦滚断让顷余
empty($result) $result为空的话就返回乎塌true 否则返回false
select id,name from table where name is null and name >''
这样子,name>''这个看你茄粗岁的情况
一般我判图篇文章是否是有小图颤睁凳烂,我是这样子
select id,image,name from table where lable=rec and (image is not null and image>'' )
20.4.38 mysql_ping() int mysql_ping(MYSQL *mysql) 20.4.38.1 说明检查到服务器的源羡连接雹让拍是否正在工作。如果它关闭了,自滑茄动尝试一个再连接。 这个
$result_a=mysql_query("select * from product_tag where product_id=$row[id]"团团清);
$num = 0;
$num = mysql_num_rows($result_a);
if(!$num == 0){
?>
while($row_a=mysql_fetch_array($result_a))
{
$row_b=mysql_fetch_array(mysql_query("SELECT * FROM `tag_tag` WHERE id=$row_a[tag_id]"或纯));
if($row_b[classid]==5)
{
echo $row_b[tag_name];
}
}
?>
}
?>