I have 2 tables,
admin, price
- admin contains columns (id, date_created, type, value)
- Pricing contains columns (id, date_created, relation, value)
I want to make a choice that joins two tables, where pricing.relation = admin.id
How to rename values, id and date_created strings so that they do not overwrite each other?
That's what I'm doing:
$sub_types = $database->query(' SELECT pricing.*, admin.* FROM pricing, admin WHERE pricing.relation = admin.id ');
source share