[英]select query to display data from multiple table in different rows with in same html table
我有两个表。第一个表有两列id和bird。 第二个表有两列id和动物名。 如何使用mysql获取此记录并在不同行的html单个表中显示它。
你可以做
select
@r:=@r+1 as id ,
resultdata from
(
select birds as resultdata from birds
union all
select animals as resultdata from animals
)x,(select @r:=0)n;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.