I am using the following code, but it throws an error.
$query = db_select('sdk_country', 'f');
$query->fields('f', array('id','group'));
$query->condition(array(
'f.status', 1, '=',
'f.country_value', 'Afghanistan', '=',
));
$result = $query->execute();
The error I get is the following.
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
FROM sdk_country f WHERE (Array IS NULL )
at line 1:SELECT FROM {sdk_country} f WHERE (Array IS NULL ) ; Array ( )
in retreiveEMEAList() (line 458 of C:\Repository\code\beta\sites\all\modules\nhdp_register\nhdp_register.module).
How can I fix this error?