· 8 years ago · Aug 07, 2018, 12:20 AM
1process for updating database
2CREATE NEW FIELD IN or_en_listingsdb TABLE CALLED status
3
4Reference chart of values
5--------------------------
60 = current
71 = to be removed
8--------------------------
9
10STEP ZERO ---------------------------------------
11Run through database and if record exists then leave record at 0 else update to 1.
12
13DELETE ---------------------------------------
14if (status == 1)
15>> pull or_en_listingsimages table to find out all images associated with listingID and remove them from listing_photos dir
16>> remove entry in or_classlistingsdb table
17>> remove entries in or_en_listingsdbelements table
18>> remove entry in or_en_listingsdb table
19
20UPDATE ----------------------------------------
21if (status == 0)
22>> leave entry alone as it is still valid
23
24ADD -------------------------------------------
25Check to see if entry exists in database
26If entry exists (leave alone and move on to next one)
27If entry does not exist (import new data and photos)
28
29
302 NEW FILES TO BE CREATED
31-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
32marker.php : compares current db with new idx file and updates status
33rem_old.php : removes expired db entries and images
34
352 FILES TO BE UPDATED
36-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
37dataprocess_all.php : update to check against db to see if record needs to be added (Everyone else)
38dataprocess_tng.php : update to check against db to see if record needs to be added (TNG only)