扫码关注官方订阅号
以下是我的php代码:,
$sql = "SELECT author,tags,subject,tid,authorid,dateline,fid FROM threads ORDER BY dateline DESC LIMIT 10"
如果tags是空值,则跳过,该怎么改呢?
认证0级讲师
如果空值是:NULL 则:
NULL
$sql = "SELECT author,tags,subject,tid,authorid,dateline,fid FROM threads WHERE tags IS NOT NULL ORDER BY dateline DESC LIMIT 10"
如果空值是:''
''
$sql = "SELECT author,tags,subject,tid,authorid,dateline,fid FROM threads WHERE tags !='' ORDER BY dateline DESC LIMIT 10"
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
如果空值是:
NULL
则:
如果空值是:
''