diff --git a/ddns.py b/ddns.py index cbe2bf0..063c563 100755 --- a/ddns.py +++ b/ddns.py @@ -232,7 +232,7 @@ def edit_subdomain(domain): if count == 0: print('[red]Error:[/red] Top domain [bold]%s[/bold] does not exist in the DB. So I\'m giving up!.' % (top)) else: - cursor.execute('SELECT COUNT(*) FROM subdomains WHERE name like ? and main_id=(SELECT id from domains WHERE name like ? or name like)',(sub,top,longtop)) + cursor.execute('SELECT COUNT(*) FROM subdomains WHERE name like ? and main_id=(SELECT id from domains WHERE name like ? or name like ?)',(sub,top,longtop)) count = cursor.fetchone()[0] if count == 0: print('[red]Error:[/red] Domain [bold]%s[/bold] does not exist in the DB. So I\'m giving up!.' % (domain))