What I'm trying to do is display a single datatable with data from two SQL tables (which contain identical column setups) using PHP server-side processing, and I want to add a column to the table to distinguish which SQL table that row is from. This is basically what I am looking to do:
SQL Table A
-----------------
Name Phone
Joe 555-5555
Blair 666-6666
Jake 777-7777
SQL Table B
-----------------
Name Phone
Al 444-4444
Jim 333-3333
Dean 222-2222
Data Table
-------------------------
From Name Phone
B Al 444-4444
A Blair 666-6666
B Dean 222-2222
A Jake 777-7777
B Jim 333-3333
A Joe 555-5555
I searched on google and through the forums and found some stuff referencing "inner joining" not sure if that's what I need to do this or not? If someone could point me in the right direction I would appreciate it!.
(Sorry for un-aligned tables in the example... i tried adding spaces to show the difference in columns, but they are removed when posting).
SQL Table A
-----------------
Name Phone
Joe 555-5555
Blair 666-6666
Jake 777-7777
SQL Table B
-----------------
Name Phone
Al 444-4444
Jim 333-3333
Dean 222-2222
Data Table
-------------------------
From Name Phone
B Al 444-4444
A Blair 666-6666
B Dean 222-2222
A Jake 777-7777
B Jim 333-3333
A Joe 555-5555
I searched on google and through the forums and found some stuff referencing "inner joining" not sure if that's what I need to do this or not? If someone could point me in the right direction I would appreciate it!.
(Sorry for un-aligned tables in the example... i tried adding spaces to show the difference in columns, but they are removed when posting).