PHP MySQL – Once a Week Operations -
i've got database processes order - order inserted @ beginning of process if process not complete (they left page etc) "confirmed" field not filled in, allows admin know orders complete or not.
at moment don't have luxury of adjusting way website manages data, can add sort of weekly cleanout of these database fields "confirmed" = 0.
how go doing automatically? there way run query on weekly, monthly, yearly basis?
edit:
what if added website stored on restricted, shared server have no access box itself?
you can use cron perform job. if need clean database incompleted orders show completed ones humans , don't export them other places (e.g. manager visits backend once per day , looks completed orders manually), suggest not hire cron this. can add few lines of code remove old entries database each time backend accessed.
delete queries executed fast there no problems perfomance. real data deletion performed request. don't need have cron (some cheap hosting providers not give access service).
Comments
Post a Comment