1

I know same question has been posted and Answer on stackoverflow. I tried but it is not working with Update Query.

seenQuery = ("UPDATE ChatHistorys SET isRead=1 WHERE isRead=0 AND senderId=5 AND receiverId=1")
q = dbpool.runQuery(seenQuery, ()) 

During the execution of the above query, I'm getting No results. Previous SQL was not a query.

When I tried with "SELECT" and "INSERT" query, it works perfectly.

query = ("SET NOCOUNT ON;\nINSERT into ChatHistorys (senderId, receiverId,isRead) values (1, 4, 0)")
d = dbpool.runQuery(query, ())

The above code for "INSERT" query, which works fine for me. Then what is the issue with "UPDATE" Query. Any one can help me with this ?

Community
  • 1
  • 1
Mitul Shah
  • 1,556
  • 1
  • 12
  • 34

0 Answers0