[thelist] reworded MySQL query insert and back again Solved
Andrew Maynes
andrew at humanbehaviour.co.uk
Wed Feb 12 08:53:29 CST 2003
just so you all know I managed to spot the error with this, it was the value
color_id that just need to be changed to cName: thanks for all that helped. ;p
Andrew
function showColor($item_id)
{
$query="select ref_colours.* from item_color ,ref_colours where
ref_colours.ColorID=item_color.color_id and item_color.item_id=$item_id";
$rs=mysql_query($query);
if(!$rs)
{
echo "Error while exeuting the query";
}
else
{
while($row=mysql_fetch_array($rs))
{
$color_id=$row['ColorID'];
$cName=$row['ColorName'];
echo "<option value=\"$color_id\">$cName</option>";
}
}
}
More information about the thelist
mailing list