Hi Folks,
I was hoping someone could help me with this.
Im trying to automatically fill a dropdown list with data from MYSQL table.
Sizes Table
ProductId | size1 | size2 | size3 | size4 | size4 | size6 |
- the 'size' rows hold a numeric value for the quantity I have of each
I was hoping to only list the sizes that have a greater number than 0.
I have used an auto fill select code on another project but I'm just not sure how to fill in the blanks.
$query = mysql_query("SELECT * FROM sizes WHERE `productCode`='$productCode' AND ????? size1 23456 >= 1 "); // autofill dropdown list 'select' with options from DB
$r = mysql_fetch_array($query);
echo "<select name=option1>";
for(?????)
{
echo "<option value=?????>?????</option>";
}
echo "</select>";
Any help would be GREATLY apppreciated.