clivetwo Posted March 7, 2012 Share Posted March 7, 2012 Hi guys I hope I am in the right place on this forum, if not I apologise. A have been working with CS-Cart and had so much trouble trying to update product combinations so I searched for help on the data feeds I am using and found that there was a script that would update my products for os-commerce, this has worked out even worse. All I really need is for a script to update one column called amount in a Mysql table by referring to the product_code column, Eg If product_code NS324 is= to 5 ad 5 to the amount column. This sounds simple but I think it might be complex. Here is the Table Generated b\: phpM\Admin 3.4.9 / M\SQL 5.5.20-log SQL quer\: SELECT * FROM `cscart_product_options_inventor\` LIMIT 0, 30 ; Rows: 30 Column1-----------Column2---------------Column3--------------Column4----------Column5-------Column6-------Column7 product_id-----product_code---------combination_hash-----combination-------amount----------temp-----------position --29813--------------NS3455----------- --1447985068-----------738_3059-----------0-----------------N-------------------0 So if I can update the amount column using the product_code would solve all of my problems. So this is what I need to do, I need to add an amount to the amount column related to the product_code NS3455 or update amount or even replace amount it don't matter. Due to the nature of the feeds I receive I cannot use product_id or combination_hash or combination. Please help me do this. Lets see who is the clever one. Thanks for you time Link to comment https://forums.phpfreaks.com/topic/258493-updating-a-column-in-a-mysql-table-with-php-help-me/ Share on other sites More sharing options...
blacknight Posted March 7, 2012 Share Posted March 7, 2012 really /facepalm http://dev.mysql.com/doc/refman/5.0/en/update.html wala read ... it will help alot.... Link to comment https://forums.phpfreaks.com/topic/258493-updating-a-column-in-a-mysql-table-with-php-help-me/#findComment-1325017 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.