Home > Backend Development > PHP Tutorial > sql语句的意思,该怎么处理

sql语句的意思,该怎么处理

WBOY
Release: 2016-06-13 10:21:56
Original
808 people have browsed it

sql语句的意思
DB::query("SELECT COUNT(*) FROM ". DB::table('vgallerys')." where uid IN (SELECT 

pre_home_friend.fuid FROM pre_home_friend WHERE uid = '$discuz_uid') and album=0");
这句话的意思看不懂,求解。。。。。。。希望好心人帮助

------解决方案--------------------
就是返回符合条件的记录有多少条.
输出 sql 你就知道完整的内容是什么了.

echo "SELECT COUNT(*) FROM ". DB::table('vgallerys')." where uid IN (SELECT 

pre_home_friend.fuid FROM pre_home_friend WHERE uid = '$discuz_uid') and album=0";
------解决方案--------------------
找到vgallerys这个表中满足uid在“pre_home_friend这个表中uid等于$discuz_uid”范围内并且album=0的记录的总条数

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template