This topic is locked

can I merge 2 tables from same database into one view?

11/6/2008 5:57:15 AM
PHPRunner General questions
T
thesofa author

I have pupils and staff tables, each has unique ID and each has firstname and lastname fields,

Is it possible to merge the records from both tables into one view? just using the ID, firstname and lastname fields ??

J
Jane 11/6/2008

Hi,
just join your tables on the Edit SQL query tab.

That's all.

T
thesofa author 11/6/2008

Hi,

just join your tables on the Edit SQL query tab.

That's all.



but i thought if i join them then it needs a pair of fields to join on, all I want to do is have a view as iff all the pupils and all the staff were in one big table.

What sort of join do i do?

J
Jane 11/7/2008

Hi,
yes, to join two tables you need linked fields in both tables.

I suppose you just need to join two list pages.

Unfortunately there is no easy way to do it. As workaround use custom event to select and print all records from second table.