For the sake of completeness I am including the code to disconnect an 
option from a machine using only python/SQLite code.

def removeOption(bladeKey,  OptionKey):
    
    """
    DELETE from blade_options 
    WHERE blade_FK == ?
   AND options_FK == ? 
    """
    import sqlite3
    dbPath = config.database_path
    sqliteConnection = sqlite3.connect(dbPath)
    cursor = sqliteConnection.cursor()
    sql = 'DELETE from blade_options WHERE blades_ID == ? AND options_ID == 
?; '
    cursor.execute(sql, (bladeKey,  OptionKey, ))
    sqliteConnection.commit()
    sqliteConnection.close()
    return

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/45da4231-3550-4f5b-882e-9e61bef86bd5o%40googlegroups.com.

Reply via email to