$sql="INSERT INTO order_details(co_id,company_name,bookingf_no,amount,discount,amount_payable,amount_collected,balance_payable_on,balance_payed,executive,receipt_no,receipt_date,no_of_iss,add_size,remarks)VALUES('$id','$_POST[company_name]','$_POST[bookingf_no]','$_POST[amount]','$_POST[discount]','$_POST[amount_payable]','$_POST[amount_collected]','$_POST[balance_payable_on]','$_POST[balance_payed]','$_SESSION[User]','$_POST[receipt_no]','$_POST[receipt_date]','$_POST[no_of_issues]','$_POST[size]','$_POST[remarks]') ON DUPLICATE KEY UPDATE order_id=LAST_INSERT_ID(order_id)";
I am trying to update the values which is already available in mysql databases.If not it will insert new values. Insertion is working but UPDATING THE EXISTING VALUES IS NOT WORKING.please help me

New Topic/Question
Reply


MultiQuote


|