Jump to content

Unknown column 'username' in 'field list'


CircularStopSign

Recommended Posts

The error you received is telling you that your database query is looking for a field called [b]username[/b], but it does not exist in the database.

If you removed the [b]username[/b] field from the database, then you need to remove any references to it in your queries.

A snippet of the query code and a description of your database tables would be a good start to figuring out your issue... ;)
oh yeah haha sorry.. i meant to line 54 being "include 'join_form.."

$email_check = mysql_num_rows($sql_email_check);

    if($email_check > 0){
        echo "<strong>Your email address has already been used by another member in our database. Please use a different Email address!<br />";
        unset($email_address);
    }
    include 'join_form.html';
    exit();
}
Hmm... the format of the code here is throwing me off.  Does it have a carriage return after:

[code]echo "<strong>Your email address has already been used by another member in our database. Please use a different Email address![/code]

If so then that's your problem :);
A carriage return is creating a new line with the "Return" or "Enter" key. If you have a carriage return at the end of a line of code before the line terminator ( [b];[/b] ), it could cause a parse error like the one you are seeing.

Make sure those lines of code look like this:

[code]
$email_check = mysql_num_rows($sql_email_check);

    if($email_check > 0){
        echo "<strong>Your email address has already been used by another member in our database. Please use a different Email address!";
        unset($email_address);
    }
    include 'join_form.html';
    exit();
}[/code]
If you are intending to include [b]join_form.html[/b] when a duplicate email address is detected, then you are correct in removing that first [b]}[/b].

Otherwise, the [b]}[/b] at the end of the code you posted would need to be removed if it did not have an accompanying [b]{[/b] higher up in your code, such as the start of an [b]if()[/b] statement.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.