-2

I'm working on the following project: http://lpmj.net/20.php

I've made several entries into phpMyadmin and am getting used to making the mySQL and php correspond, but with this error i have no idea what the code is asking for.

This is the error i'm recieving:

Unknown column 'userpass' in 'field list'

Any help what this is indicating would be appreciated.

expiredninja
  • 1,397
  • 4
  • 25
  • 45
  • 1
    Can you show the query and database structure? That error occurs when you are trying to select from a column that doesn't exist. – Jivings Jan 18 '12 at 00:23
  • 1
    can you post your `PHP` code which connectes the DB? – John Woo Jan 18 '12 at 00:24
  • 1
    there is likely a mismatched apostrophe in your query. I would do a to see what the queries you have are actually doing, and likely there is a field without any content, or the content is not escaped correctly (contains a comma). This makes the query unable to find the field it it looking for. – Ryan Jan 18 '12 at 00:27
  • 1
    The error message is self explanatory, you'll need to provide a code snippet in order for anyone to offer a solution to your overall problem. – CBusBus Jan 18 '12 at 00:35

2 Answers2

3

It means userpass does not exist. Check your spelling and make sure it does in fact exist

Paul Dessert
  • 6,363
  • 8
  • 47
  • 74
3

This means that your field-list — the stuff right after the word SELECT — refers to a column named userpass, but that that column doesn't exist in the table(s) you're selecting from. For example, maybe your query looks like this:

SELECT userpass FROM foo;

when it should actually look like one of these:

SELECT userpass FROM bar;  -- was looking in the wrong table
SELECT user_pass FROM foo; -- mistyped the name of the column
ruakh
  • 175,680
  • 26
  • 273
  • 307