teksigns Posted April 2, 2003 Share Posted April 2, 2003 i have the folling code in my includes/functions/general.php file // BOF Enable - Disable Categories Contribution-------------------------------------- function tep_set_categories_status($categories_id, $status) { if ($status == '1') { return tep_db_query("update " . TABLE_CATEGORIES . " set categories_status = '1' where categories_id = '" . $categories_id . "'"); } elseif ($status == '0') { return tep_db_query("update " . TABLE_CATEGORIES . " set categories_status = '0' where categories_id = '" . $categories_id . "'"); } else { return -1; } } // EOF Enable - Disable Categories Contribution-------------------------------------- im adding another product status to my products i have all of that part working already . however i would like to change the above code to update the product status of every product in the directory thats set to disabled to product status 2. how can i do this . im sure its just a simple mysql statement but im having trouble figuring this out . i only want the product status set to 2 in the disabled directory if the current product status is not equal to "0" help ! Quote Link to comment Share on other sites More sharing options...
teksigns Posted April 2, 2003 Author Share Posted April 2, 2003 does anyone know how to put together a sql statement in php to do what im trying to do ? Quote Link to comment Share on other sites More sharing options...
SwissChris Posted June 27, 2004 Share Posted June 27, 2004 Will have it implemented shortly if you have not already! Got to create a loop... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.