I am writing module for validation using hook_form_alter.
I have to validate field(district) from my content type.Here one another field is "state", after selecting "state" field i have to compare this field and states of selected "district" field from table which is not content type table but in same database. I had used db_query and fetch the result but not getting any values in that. So please help me to get values from another table in hook_form_alter() function.