This code:
$db->query(“INSERT INTO pulling (id, user, work_order_id, product, cleaned, cleaningtime, comments, skipto) VALUES (‘$next_id’, ‘”. $_SESSION['userN'] .”‘, ‘$work_order_id’, ‘$prod_sku’, ‘$db_cleaned’, ‘$db_cleaningtime’, ‘$db_comments’, ‘$db_skipto’)”);
is in one of our scripts and i need it to changed to update some but not all of the fields. Right now the main problem is that it’s auto incrementing on the id and we need it to not update the id and let it stay the same.
Also right now it’s deleting what is already in the product field and we need it to not do anything and let it keep whatever info is in there.
The rest of the fields do need to be updated. I know my 1st problem is that it’s inserting and not updating but i tried a few things and it messed things up more.
Here is what i tried:
//$db->query(“update pulling set user= ‘”. $_SESSION['userN'] .”‘,cleaned=’$db_cleaned’,cleaningtime=’$db_cleaningtime’,comments=’$db_comments’, skipto=’$db_skipto’”);
and
//$db->query(“update pulling set user= ‘”. $_SESSION['userN'] .”‘,cleaned=’$db_cleaned’,cleaningtime=’$db_cleaningtime’,comments=’$db_comments’,skipto=’$db_skipto’ where product=’$prod_sku’”);
i tried a few other things also but didn’t save them. Hopefully this wil lbe cheap, easy and quick. Thanks.