how to update single row from table by using a single sql query. here im using library system.when a book is issued to the user,it should be updated to database, only which book is issued
You can use something like
UPDATE `books` SET available = available - 1 WHERE book_id = <book id here>