This topic is locked

how to link multiple tables into one search page

11/30/2007 8:59:14 AM
PHPRunner General questions
D
djdubuque author

I have three tables that I update once every month, these tables each have two fields that are consistent to them. But each has different data that needs to be searched against to display the final output. Can someone walk me through the steps needed to get my search page working? (yes, I'm a newbie).
Thanks <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=6947&image=1&table=forumtopics' class='bbcemoticon' alt='<<' />

Alexey admin 11/30/2007

Hi,
you can use UNION SQL statement to combine data from several tables on a single page.

I.e.

select

...

from table1

union all

select

...

from table2

union all

select

...

from table3


To use this query in PHPRunner create a view in your database first using CREATE VIEW command.

Then use this view in PHPRunner.