I have two tables.First table having two columns id and birds. Second table has two columns id and animals name. How to fetch this record using mysql and display it in a html single table in different rows.
You can do as
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;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.