Home  >  Article  >  Backend Development  >  怎么同时查询多个数据表

怎么同时查询多个数据表

WBOY
WBOYOriginal
2016-06-13 11:45:173334browse

怎样同时查询多个数据表
有3个表(jtrb1,jtrb2,jtrb3),每个表都有几十万行记录,且每个表字段名称都一样(id,name,price,intime,outtime
怎样同时查询3个表里的内容?
比如我要在3个表里同时查字段name为“上衣”价格price小于“300”的记录。
求贴个PHP代码,单个表查询会做,多个表的就搞不动了。
另外:多表查询能不能用

while($row = mysql_fetch_array($result))

来输出内容?
最主要的还是贴个代码啊。谢谢啦!!

Statement:
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