我有一些来自我的客户的东西,我需要更新,虽然这是我第一次看到这段代码。
CREATE NEW FIELD IN or_en_listingsdb TABLE CALLED status
Reference chart of values
--------------------------
0 = current
1 = to be removed
--------------------------
STEP ZERO ---------------------------------------
Run through database and if record exists then leave record at 0 else update to 1.
DELETE ---------------------------------------
if (status == 1)
>> pull or_en_listingsimages table to find out all images associated with listingID and remove them from listing_photos dir
>> remove entry in or_classlistingsdb table
>> remove entries in or_en_listingsdbelements table
>> remove entry in or_en_listingsdb table
UPDATE ----------------------------------------
if (status == 0)
>> leave entry alone as it is still valid
ADD -------------------------------------------
Check to see if entry exists in database
If entry exists (leave alone and move on to next one)
If entry does not exist (import new data and photos)
2 NEW FILES TO BE CREATED
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
marker.php : compares current db with new idx file and updates status
rem_old.php : removes expired db entries and images
2 FILES TO BE UPDATED
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
dataprocess_all.php : update to check against db to see if record needs to be added (Everyone else)
dataprocess_tng.php : update to check against db to see if record needs to be added (TNG only)
有人可以向我解释一下我对如何创建或使用此MLS更新进行Cron作业替代方式的想法。
感谢。