Jump to content

SQL syntax help


balkan7

Recommended Posts

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 />";
	    }

Link to comment
https://forums.phpfreaks.com/topic/94372-sql-syntax-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.