I have two tables that I need to get the following information but I can't seem to figure out how to structure the query:
In Table 1 I have the following for the first row (as an example):
18" - 21.9"
Basically in Table I want to link the two tables and have it count out the number of results for each parameter. For example, on the navbar I want it to grab each row and show the following by counting the number of models and then showing it next to each row. Then I want to use the result Further down in table 1 are rows with width parameters, depth parameters, etc.
18" - 21.9" (number of models)
Does that make sense?
mysql_query("SELECT count(Dimensions.model) AS total, dimensions_table.show, dimensions_table.max as maxd, dimensions_table.min as mind, dimension_table.type as ptype FROM Dimensions, dimensions_table WHERE Dimensions.ptype BETWEEN dimensions_table.maxd AND dimensions_table.mind");
But so far it's not returning any results?