At the moment I'm making a php program that can take a SQL Request with a left join (only two table) the goal is to display them and to edit them. The problem is that if I want to edit them I have to know where the variable comes from (which table...) and i would like to parse my request for know it.
SELECT users.login, users_info.linkedin, users.password, users.region, users.email, users.business, users.firstname, users.name, users.version, users.updatable, users.bodyshop_id, users.mac, users.register_date, users.lastvisite_date , users_info.address1, users_info.address2, users_info.address3, users_info.zip, users_info.cellphone, users_info.phone, users_info.direct_dial_phone, users_info.birthday, users_info.date_in, users_info.date_out, users_info.picture_private, users_info.picture_public, users_info.bodyshop, users_info.enterprise, users_info.department, users_info.job, users_info.facebook, users_info.twitter, users_info.instagram
FROM users
LEFT JOIN users_info ON users.id = users_info.id
So I just want to create a function that take for example "login" as parameter and return me "users" or linkedin would return me users_info. Do you know a proper way for doing it in php ? Thanks !