I need to include a variable inside a string in a SQL query, but something isn't right.
This is the variable:
$curr_yr = date('Y') ;
and I need it to replace the "2015" in the following query:
$query = "SELECT COUNT(`id`)
from j17_cbsubs_subscriptions
WHERE id!=62
and id !=299
and expiry_date < '2015-12-31 23:59:58'
AND status='A'";
any help is appreciated!
This is the variable:
$curr_yr = date('Y') ;
and I need it to replace the "2015" in the following query:
$query = "SELECT COUNT(`id`)
from j17_cbsubs_subscriptions
WHERE id!=62
and id !=299
and expiry_date < '2015-12-31 23:59:58'
AND status='A'";
any help is appreciated!