Query Help Needed! 2 tables
Using Coldfusion 8 and MySQL. I have 2 tables one called Products (100 items) and another table called Clearance (5 items).
I am displaying all the 100 products and need to insert the discounted_price of the 5 items from the Clearance table into the query below.
(*note- the discounted_price field only exists in the Clearance table).
Also, how can the returned list below mark the checkboxes of the 5 items from the Clearance table.
(*note-productid is used in both tables.I guess you could call it the foreign key between the tables.)
I'm a novice and unsure how to write the queries. Any help would be appreciated. Thanks in advance.
<cfoutput query="getProducts">
<tr<cfif currentrow mod 2> class="odd"</cfif>>
<td><div align="left"><input type="checkbox" name="promo" value="##"></td>
<td>(#getProducts.modelnumber#) #getProducts.modelnumber#</td>
<td>#getProducts.modeldescription#</td>
<td>#getProducts.category#</td>
<td>#getProducts.subcategory#</td>
<td><input type="text" name="discounted_price" value=""></td>
</tr>
</cfoutput>
