Page 1 of 1

Problem querying columns of type Integer in Postgresql

Posted: Wed Oct 26, 2005 1:38 pm
by padmx
Hi, maybe is a very basic question, sorry..

I have this query:

select * from services where id_serv='1';

or

select * from services where id_serv=1;

In a PHP script does´nt work and when I try it in the console it returns:

column "id_serv" does not exist

When I try with another column that is not Integer it works fine..

And this is also with all my other tables that have a Integer type column

Sorry for my english, I´m from Mexico

Padmx

Posted: Wed Oct 26, 2005 2:06 pm
by pickle
Check your table structure. The error you are getting sounds like the column `id_serv` does not exist in your table.

Posted: Wed Oct 26, 2005 5:00 pm
by padmx
Thanks for your reply, pickle..

However, the column 'id_serv' does exist in the table services..

Finally I ended renaming the field from 'id_serv' to 'servid' and it works!

Padmx