我正在尝试用一个 foreach
循环,但它将替换为以前的记录:
TableID ---- ProductID --- Color ---- ImageSample
foreach($Extras['ColorText'] as $key=>$val)
{
$query = "update productcolor set
Color = '".$Extras['ColorText'][$i]."' Where
ProductID = '".$RecordID."' ";
echo $query;
$App1->query($query);
$i++;
}
我的html代码:
<td align="left" valign="top">Product <br />
<input type='text' name='Color[]' class='auto TextField' value="<?php echo $App->f("Color"); ?>"></td>
</td>
查询显示:
update productcolor set Color = 'sdasdas', ImageSample = '' Where ProductID = '93' update productcolor set Color = 'sdasdas', ImageSample = '' Where ProductID = '93' update productcolor set Color = 'Yellow', ImageSample = 'listing.png' Where ProductID = '93'
暂无答案!
目前还没有任何答案,快来回答吧!