Skip to content Skip to sidebar Skip to footer

Mysql Wrongly Update The Dynamic Row Records

I trying to update my dynamic row values here. When i insert a new voucher record it could inserted the values correctly into database. When i edit the record values that time also

Solution 1:

because your where condition is wrong,

have a look at

$e_tariff = mysql_query("UPDATE ebvouchertariffs SET TariffSlNo = '$e_slno', TariffDate = '$e_date', TariffParticulars = '$e_particulars', NoOfNights = '$e_noofnights', TariffRate = '$e_rate', TariffPrice = '$e_price', TariffTax = '$e_tax', TariffNetTotal = '$e_nettotal', TariffAddTotal = '$e_totalamount', TariffFinalTotal = '$e_finaltotal', ModifiedOn = NOW() WHERE VoucherID_Fk = '$uid'");

the $uid pointing to wrong key, the key should come from inside of foreach

Solution 2:

I am not very sure about it. But as much as I hv come across php I hv never seen "Key" of a multi dimensional associative array as being used as second index parameter while displaying data from an array!!! I cant comment so i posted this as an answer... Sry. :)

Post a Comment for "Mysql Wrongly Update The Dynamic Row Records"