I am facing a challenge with my MySQL database as it contains multiple tables with similar columns, and I want to import this data into a Google spreadsheet.
For instance:
table1
has id
, name
, page
, and other specific columns.
table2
also includes id
, name
, page
, and some different columns.
table3
follows the same pattern with id
, name
, page
, and more unique columns.
This is the code snippet I am using:
function readFromTable() {
// Code snippet for reading data from database and updating Google spreadsheet goes here
}
I want to retrieve id, name, and page fields from all three tables in a single query while maintaining their order of arrival. I have manually entered corresponding IDs (1, 2, 3) sequentially in each table, but the current output organizes the results by table, which is not what I need:
id
name
page
1
name1
toys
I would share a visual representation if possible, but limited reputation restricts me from doing so.
If anyone has suggestions on how I can achieve the expected output with data arranged based on arrival order across tables, please advise. Thank you.