Your query is off. WHERE A, B AND C
is not valid MySQL; rather, it should be WHERE A AND B AND C
:
SELECT targets_set
FROM targets
WHERE
targets_nmc='F80'
AND sp_dealer_code=$dealer
AND `targets_date` BETWEEN '2014-01-01 00:00:00' AND '2014-01-31 23:59:59'
LIMIT 1
When the statement is executed, no result set is given back. That's why you get that error message when you try to fetch the result as an associative array.