This topic is locked

union or inner union for tables

2/22/2008 7:04:10 AM
PHPRunner General questions
U
uludag author

Hi,

I have searched the forum for combining the tables into one, and found that this is possible with union function.

However, I could not manage this to work.

I have several tables such as people, books, articles, translations, etc.

I want all the data in all tables are combined into one table in, for example, people table.

I found this code:

select

...

from table1

union all

select

...

from table2

union all

select

...

from table3



I feel it will work, but I did not. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=7643&image=1&table=forumtopics' class='bbc_emoticon' alt=':(' />

Any help possible?

Sincerely,

Uludag.

J
Jane 2/22/2008

Hi,
you can't use UNION in the PHPRunner directly.
As workaround create view in the database and then use it in the project.