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... ;)
Link to comment
Share on other sites

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();
}
Link to comment
Share on other sites

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 :);
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.