PHP SELECT * . I am performing a query on two tables and they both have a column user They both are associated by their ID. I want to give table 1 user the alias user and table two the alias alt_user . How do I do that?
This is wrong but it will help:
$sql = "SELECT * dd.user AS user, oi.user AS alt_user FROM data dd JOIN orders oi ON dd.id=oi.id WHERE dd.name LIKE :term";