balkan7 Posted March 4, 2008 Share Posted March 4, 2008 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE banner_id = 30' at line 2 code: $banner_expire_choice = isNum($_POST['banner_expire_choice']) ? $_POST['banner_expire_choice'] : "1"; $expire = "NOW() + INTERVAL ".$banner_expire_choice." WEEK"; $bquery = "banner_url = '$banner_url', banner_img = '$banner_data'"; if ($banner_expire == "") { $update_banner = dbquery("UPDATE ".$db_prefix."banners SET banner_type = '$banner_type', banner_status = '$banner_status', banner_plan_id = '$banner_plans', client_id = '$client_id', banner_name = '$banner_name', ".$bquery." WHERE banner_id = ".$banner_id); echo "<center>".$locale['M_058']."</center><br /><br />"; } else { $update_banner = dbquery("UPDATE ".$db_prefix."banners SET banner_type = '$banner_type', banner_status = '$banner_status', banner_plan_id = '$banner_plans', client_id = '$client_id', banner_name = '$banner_name', banner_end = ".$expire.", ".$bquery." WHERE banner_id = ".$banner_id); echo "<center>".$locale['M_058']."</center><br /><br />"; } Quote Link to comment Share on other sites More sharing options...
fenway Posted March 5, 2008 Share Posted March 5, 2008 Echo the string you're passing to dbquery(). 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.