Answer the question
In order to leave comments, you need to log in
Misunderstood error?
I can't figure out what's the problem
def send_messange():
delete_query = "DELETE FROM music LIMIT 1"
cur.execute(delete_query)
con.commit()
schedule.every().day.at('19:09').do(send_messange)
while True: # этот цикл отсчитывает время. Он обязателен.
schedule.run_pending()
time.sleep(1)
Answer the question
In order to leave comments, you need to log in
def _execute_command(self, command, sql):
"""
:raise InterfaceError: If the connection is closed.
:raise ValueError: If no username was specified.
"""
if not self._sock:
raise err.InterfaceError(0, "")
Are you sure you wrote the request correctly?
LIMIT is usually used to limit the sample size in a SELECT
Example - display one last record:
SELECT * FROM music LIMIT 1
WHERE in DELETE is used to set a condition on which data will be deleted
For example - delete all records for id 1:
DELETE FROM music WHERE id= one
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question