I am tring to perform the following sql query to check if the name that was inserted to the form already created as taxonomy name. But I keep getting this error message:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column
'test'
in'where clause'
:SELECT COUNT(*) FROM {taxonomy_term_data} WHERE name = test;
Array ( ) inget_google_map_api()
(line 79 of /Applications/MAMP/htdocs/Drupal/sites/all/modules/toodate/toodate.module).
my function is:
function get_google_map_api($item){
$city_name = $item;
$chack_if_is_taxonomy = (db_query("SELECT COUNT(*) FROM {taxonomy_term_data} WHERE name = ".$city_name));
var_dump($chack_if_is_taxonomy);
drupal_exit();
}