removed debug

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-17 01:32:10 +01:00
parent 993da418d8
commit ab986afb77
2 changed files with 3 additions and 5 deletions

View File

@ -52,15 +52,11 @@ def register_tube(mac_address):
cur.execute("SELECT * FROM tubes WHERE mac_address = %s", (mac_address,)) cur.execute("SELECT * FROM tubes WHERE mac_address = %s", (mac_address,))
existing_tube = cur.fetchone() existing_tube = cur.fetchone()
print(existing_tube)
# Check if the tube exsist. If it doesn't create a new db row # Check if the tube exsist. If it doesn't create a new db row
if not existing_tube: if not existing_tube:
cur.execute("INSERT INTO tubes (mac_address, universe, dmx_address) VALUES (%s, %s, %s)", cur.execute("INSERT INTO tubes (mac_address, universe, dmx_address) VALUES (%s, %s, %s)",
(mac_address, 0, 1)) (mac_address, 0, 1))
print("executed")
else: else:
print("already exists")
pass pass
cur.close() cur.close()

View File

@ -32,7 +32,9 @@
die("Connection failed: " . $conn->connect_error); die("Connection failed: " . $conn->connect_error);
} }
echo "Connected successfully"; echo "Connected successfully";
?>
?>
?> ?>
</tbody> </tbody>
</table> </table>