Hi all, I am working on a custom script for my website and I ran into problem when using a simple select to get information from a database.
I need to make this:
$time = TIME_NOW;
$db->simple_select("challenges", "*", "start+length>='".$time."' ...... )
into this:
$end_time = $pend['start']+$pend['length'];
$time >= $end_time
What basically I'm trying to do is only pull the information from the database where the current time (TIME_NOW) is greater than or equal to "Start + Length". The problem is that in the Simple select I have to have the start+length first. I was hoping someone could help me with this.
UPDATE: Never mind I figured it out.
I need to make this:
$time = TIME_NOW;
$db->simple_select("challenges", "*", "start+length>='".$time."' ...... )
into this:
$end_time = $pend['start']+$pend['length'];
$time >= $end_time
What basically I'm trying to do is only pull the information from the database where the current time (TIME_NOW) is greater than or equal to "Start + Length". The problem is that in the Simple select I have to have the start+length first. I was hoping someone could help me with this.
UPDATE: Never mind I figured it out.







