Hello,
I need help please..
I have 4 tables:
region:
regionID --primary
regionName
plantType:
plantTypeID --primary
plantTypeDesc
plant:
plantID --primary
plantName
plantScientificName
plantDesc
plantImage
relation: -- no primary keys
plantID
regionID
plantTypeID
-The idea is simple, I want the user to be able to see a list of plant names and their descriptions after choosing the plant type and the region from two drop down menus and clicking the submit button. So I want the query to display the plantName , plantDesc.
-The form right now is connected to the region and plantType tables and shows the list of regions and plantTypes available but I don't know how to write the query so it selects the plantName and plantDesc from plant table that has the same plantID in relation table that is in the same row as the regionID and plantTypeID that the user chose.
Confusing? im confused too 😕 specially for someone who is very new to php and database in general !! I thought it wasn't that hard!!
Please any hint? references? ideas? ANYTHING!! :o
Is there a better way to do the tables? is it better to join the relation table with the plant one? it will be too big!
I appreciate any help..