umm the mysql update query wont work? Well I've had problems like this at times but theres really an easy way to debug. The mysql query string may have a typo in it, or the variables used to locate or update the database contain wrong information. To debug, lets consider the example below:
PHP Code:
runquery("UPDATE {$prefix}adoptables_conditions SET promocode='{$code}' WHERE type='{$type}'");
The query string is enclosed in the function runquery. The variable $code is used to update database info, while the other variable $type is used to locate the specific row in a table. You can debug by outputting values inside the variables $code and $type to the screen and see if they contain the correct information. If so, you've apparently made a typo with the query string. Otherwise, chances are you've incorrectly assigned values to $code or $type.