I have this code:
$activox_count_query = tep_db_query("select *
from " . TABLE_ORDERS . " o, " . TABLE_GANTS . " g
where o.orders_status = '32'
and g.orders_id = o.orders_id
and g.title = 'Activar Servicio'
and g.start >= now()");
$activox_count = tep_db_fetch_array($activox_count_query);
tep_db_query("update " . TABLE_ORDERS . "
set orders_status = '32',
last_modified = now()
where orders_id = '" . (int)$activox_count['orders_id'] . "'
and orders_status = '31'");
I need if the gants table date that contains the title = 'Activar Servicio'
and the start equal to or greater than today's date, make an update to the orders table.
Go from state 31 to 32 if and only if the day is greater than or equal to today, in YYYY:MM:DD
include HH:MM:SS