I have set up a query (search form) that returns product data to the user. In one case, my product table is linked to a productStyles table (product table field contains an integer which is checked against the IDs in productStyles for something like 1 = "Blue Style").
However when I display the data on my page after a successful query the following happens:
If any of the product styles is 1 then it returns the data from productStyles twice (so in this case the product will display on screen "Style: Blue Style Blue Style"). All other products and thier styles however work.
The query:
select * from Homes inner join HomeStyles ON Homes.HomeStyle = HomeStyles.ID where ...(whatever conditions are set on the search form)
Then I just dump the style data to the page with
while($row=mssql_fetch_array($nt)){
echo "$row[Style]";
}
The Tables (HomeStyle in Homes should reference Style in HomeStyles. If Homes.HomeStyle = 1 then I get this problem)
HomeStyles
ID, Style, StyleType
Homes
ID, PlanNum, Name, SqFt, Levels, Bedrooms, HomeStyle
This is what happens when I don't actually use PHP/SQL for months while at school, ugh my brains! Thanks for any help with this matter.
However when I display the data on my page after a successful query the following happens:
If any of the product styles is 1 then it returns the data from productStyles twice (so in this case the product will display on screen "Style: Blue Style Blue Style"). All other products and thier styles however work.
The query:
select * from Homes inner join HomeStyles ON Homes.HomeStyle = HomeStyles.ID where ...(whatever conditions are set on the search form)
Then I just dump the style data to the page with
while($row=mssql_fetch_array($nt)){
echo "$row[Style]";
}
The Tables (HomeStyle in Homes should reference Style in HomeStyles. If Homes.HomeStyle = 1 then I get this problem)
HomeStyles
ID, Style, StyleType
Homes
ID, PlanNum, Name, SqFt, Levels, Bedrooms, HomeStyle
This is what happens when I don't actually use PHP/SQL for months while at school, ugh my brains! Thanks for any help with this matter.