In the database I have three tables with different number of columns, I need to fetch data in timestamp order. The tables do not have relationships.
Database table:
new products will be added to the tables, I need them to be displayed in timestamp order, that is, the most recently added product must be displayed in the first row.
products display must be like:
I tried this query, but the output gives me empty values: where is the mistake?
$query = 'SELECT "id", "number", "name", "price", "weight", NULL AS "made", NULL AS "brand" FROM Product 1
UNION
SELECT "id", "number", "name", "price", "size", NULL AS "made", NULL AS "brand" FROM Product 2
UNION
SELECT "id", "number", "name", "price", "size", "made", "brand" FROM Product 3
ORDER BY "date" DESC';
How to implement so that the last added product is displayed first in the list of products?