Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
padmx
- Forum Newbie
- Posts: 3
- Joined: Tue Sep 20, 2005 6:36 pm
Post
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
-
pickle
- Briney Mod
- Posts: 6445
- Joined: Mon Jan 19, 2004 6:11 pm
- Location: 53.01N x 112.48W
-
Contact:
Post
by pickle »
Check your table structure. The error you are getting sounds like the column `id_serv` does not exist in your table.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
-
padmx
- Forum Newbie
- Posts: 3
- Joined: Tue Sep 20, 2005 6:36 pm
Post
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