I want to access a database merging two tables from a php script in order to output the result to an html table. Both tables are pretty much the same except one column I need only exists in one table. I don't have direct access to the database.
INSERT INTO globalusers
(surname, firstname, email, location)
INSERT INTO localusers
(surname, firstname, email)
Location exists only in globalusers. I need to use this column as a dropdown filter in my table and add the column location with the string "local" to the data coming from the localusers table.
Here's a fiddle
So the expected result would be one table with four columns and the string "local" in the location column for the localusers table.
What is the select that I need?
MySQL version: 5.5.36