I have 2 tables in my db, departments and company_com. What I am trying to do is, if a posted value in php is run in a query, check the first table for a value and if found, query the second table with that value.
So, for example, posted value = demo, I run select query to store the value in a variable and then use that variable in query on company_com. I know how to query tables but not sure how to store the value in a variable in php. Thanks
BTW I am using MySql and not pdo or mysqli.