Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cron 更新数据库的过程_Cron - Fatal编程技术网

Cron 更新数据库的过程

Cron 更新数据库的过程,cron,Cron,虽然这是我第一次看到这段代码,但我有一些来自我的客户的东西需要更新 CREATE NEW FIELD IN or_en_listingsdb TABLE CALLED status Reference chart of values -------------------------- 0 = current 1 = to be removed -------------------------- STEP ZERO -------------------------------------

虽然这是我第一次看到这段代码,但我有一些来自我的客户的东西需要更新

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的工作


谢谢。

您可能应该删除这里的SQL标记……嗯,您能指定一下吗,先生,因为我不是一个完全的程序员,只是想帮助我的客户解决这个问题。只是说这看起来与SQL无关。好的,谢谢您的润色。。这里有人能告诉我如何配置这个吗?先谢谢你。。。