View Single Post
  #3  
Old 03-10-2012, 11:16 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 335,484
Hall of Famer is on a distinguished road
Default

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.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote