[PHP-MYSQL] How can i use SELECT* FROM (not table name but an inner joined table that have just been queried)
Here is my situation
On my page I have the first sql statement to inner join four tables of data together and noted that as $sql
(I have tried fetching the array and building the html table and it's all good)
I would like to add a dropdown box for the user to be able to filter the INNER JOINED table
so i have a dropdownlist which will be the $_POST['variable']
when the user select it and press submit
it will go to $input = $_POST['variable'];
now to filter it i use
$select = "SELECT * FROM [[at this point i would like to use the INNERJOINED table ]] WHERE test_id=$input ";
i don't know how to select from the just joined table at the top of my page
so anyone knows how would i do that?? thank you
Here is my situation
On my page I have the first sql statement to inner join four tables of data together and noted that as $sql
(I have tried fetching the array and building the html table and it's all good)
I would like to add a dropdown box for the user to be able to filter the INNER JOINED table
so i have a dropdownlist which will be the $_POST['variable']
when the user select it and press submit
it will go to $input = $_POST['variable'];
now to filter it i use
$select = "SELECT * FROM [[at this point i would like to use the INNERJOINED table ]] WHERE test_id=$input ";
i don't know how to select from the just joined table at the top of my page
so anyone knows how would i do that?? thank you