Regarding your specific error, it sounds like you have tried to access a column that does not exist. If you are able to provide some more information, we may be able to identify your problem more precisely.
Here are some tips on getting accurate answers to your questions: