Hi
I am having a problem pulling data from 3 mysql table . I will try and explain as best i can -
I have 3 tables customerdetails , department , location
In customer details an locationid is inserted and same for department from drop down menus which lists the values from the msql tables department and location .
i am wanting to create a query which will display all the customer details along with their locationname and department name.
I created the query below as this lists all the location names from tble location
$sql="SELECT locations.location FROM locations INNER JOIN finalcustomer ON finalcustomer.locationid=locations.locationid WHERE finalcustomer.locationid=locations.locationid";
But im just getting a bit confused now and not sure if im on the right track .
If any would could help would be grateful thanks