I have a script I want to set a cron job against to act as a CGI - It works like this (this is only part of the page):
/ Check for clients at end of 14 day trial /
$query = <<END_QUERY
select first_name, last_name, username, password, email
from clients
where (TO_DAYS(now())-TO_DAYS(date_created))='$trial_days'
END_QUERY;
$result = mysql_query($query)
or die(mysql_error());
But I want to specify that it should ONLY effect clients who's 'property_num' field is less than five in the MySQL DB. So I changed it to this:
/ Check for clients at end of 14 day trial /
$query = <<END_QUERY
select first_name, last_name, username, password, email, property_num
from clients
where (TO_DAYS(now())-TO_DAYS(date_created))='$trial_days' AND property_num < 5"
END_QUERY;
$result = mysql_query($query)
or die(mysql_error());
However, now it doesn't work? Any thoughts as to what could be wrong? The full code is attached if required. Thanks.