From b182c359fc8c5384b1a65ed44d565d5195267424 Mon Sep 17 00:00:00 2001 From: flifloo Date: Tue, 3 Mar 2020 23:32:12 +0100 Subject: [PATCH] Fix SQL syntax for WHMCS --- whmcs/insert_whmcs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/whmcs/insert_whmcs.py b/whmcs/insert_whmcs.py index 06e4614..fbe4618 100644 --- a/whmcs/insert_whmcs.py +++ b/whmcs/insert_whmcs.py @@ -35,8 +35,8 @@ def insert_whmcs_ipv4(insert: [(IPv4Address, str, IPv4Address, int)], interface: # For every IP to insert for i in insert: if i[1]: - cmd = f"INSERT INTO mg_proxmox_addon_ip (ip, type, mac_address, subnet_mask, cidr, gateway, tag) " \ - f"VALUES ('{i[0]}', 'IPv4', '{i[1]}', '{i[2]}', {i[3]}, '{gateway}', {vlan})" + cmd = f"INSERT INTO mg_proxmox_addon_ip (ip, type, mac_address, subnet_mask, cidr, sid gateway, tag) " \ + f"VALUES ('{i[0]}', 'IPv4', '{i[1]}', '{i[2]}', {i[3]}, 0, '{gateway}', {vlan})" try: cursor.execute(cmd) except Exception as e: