E-commerce website shopping cart, request interface problem

problem description

now it is planned that the shopping cart database should also be saved to ensure that you can see the same information on different terminals, so the question is when to change the request interface to change the database information. Each request to add items is OK, but it is not realistic to request the server after each change of quantity. When should I request the interface to submit the items in the current shopping cart?

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Aug.12,2021

this is what I do. Before leaving the page, submit the latest shopping cart data


send the request as soon as the data changes. To prevent frequent requests, cancel the previous request

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaa7f2-4f4ae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaa7f2-4f4ae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?