| 128 | |
| 129 | # Edit a entry in the table |
| 130 | def edit(key, value): |
| 131 | console.print( |
| 132 | "Enter The New Values to Update in the form of a name url channel" |
| 133 | ) |
| 134 | new_record = str(Prompt.ask("Enter Here: ")) |
| 135 | new_records = new_record.split() |
| 136 | # Execute the query to update the table |
| 137 | cursor.execute( |
| 138 | f"UPDATE dbview SET name='{new_records[0]}', url='{new_records[1]}', author='{new_records[2]}' WHERE {key}='{value}'" |
| 139 | ) |
| 140 | console.log(":green_circle: Successfully Updated Database") |
| 141 | table() |
| 142 | |
| 143 | # Get the hash of a entry |
| 144 | def hash(): |