mysql virgül değerleri güncelleştirmek

0 Cevap php

i have a product table in mysql, one of the field (attributes field ) contain comma values like attibutes_1,attibutes_2 etc. in my form i have a checkboxes foreach attributes to my product, the html like this

<input type="checkbox" value="attributes_1" name="attributes[$id][]">
<input type="checkbox" value="attributes_2" name="attributes[$id][]">

ve benim soru vardır ... nasıl ben bu niteliklerin değerlerini güncelleyebilirsiniz? implode ile bu denerseniz

  $coma_values = implode(',',$_POST['attributes'][$id]);

ve tabloya güncelleme, ama bazen mükemmel çalışıyor değildir. Daha iyi bir çözüm için bana yardım edin

0 Cevap