neverstop
11-29-2007, 01:45 AM
Hi,
I need a cron script for my website. I know what I want the script to do, but as I am not a coder I need help writing it.
It will be dealing with two tables: "adv_links" and "adv_links_cfields_entries".
There is a column in adv_links named "linkid", one named "dateline" and another named "valid".
In the adv_links_cfields_entries the relevant columns are "lid" and "field5".
"lid" in adv_links_cfields_entries will be == "linkid" in adv_links
So what I need is for the scipt to do:
look in the adv_links table for rows where valid=0
find the corresponding row in adv_links_cfields_entries where field5=approved
out of these (valid=0 AND field5=approved) find the one with the oldest dateline and then Update that one row - valid=1 and dateline=TIMENOW
I hope all of this makes sense.
Cheers,
Ian
I need a cron script for my website. I know what I want the script to do, but as I am not a coder I need help writing it.
It will be dealing with two tables: "adv_links" and "adv_links_cfields_entries".
There is a column in adv_links named "linkid", one named "dateline" and another named "valid".
In the adv_links_cfields_entries the relevant columns are "lid" and "field5".
"lid" in adv_links_cfields_entries will be == "linkid" in adv_links
So what I need is for the scipt to do:
look in the adv_links table for rows where valid=0
find the corresponding row in adv_links_cfields_entries where field5=approved
out of these (valid=0 AND field5=approved) find the one with the oldest dateline and then Update that one row - valid=1 and dateline=TIMENOW
I hope all of this makes sense.
Cheers,
Ian