Error 1054: Unknown column xxxx in WHERE clause..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ndsoumah@gmail.com

    Error 1054: Unknown column xxxx in WHERE clause..

    Hello Guys

    I'm trying to run this query

    $uneRequete = "SELECT * FROM Usager WHERE motDePasse =
    {$loginPassword }";

    and I get this error message : Error 1054: Unknown column 'xxxx' in
    WHERE clause.....
    where 'xxxx' is the content of $loginPassword

    I don't know what is going on

    Any help will be very appreciated.

    Thanks.

  • Tim Van Wassenhove

    #2
    Re: Error 1054: Unknown column xxxx in WHERE clause..

    On 2005-06-25, ndsoumah@gmail. com <ndsoumah@gmail .com> wrote:[color=blue]
    > Hello Guys
    >
    > I'm trying to run this query
    >
    > $uneRequete = "SELECT * FROM Usager WHERE motDePasse =
    > {$loginPassword }";
    >
    > and I get this error message : Error 1054: Unknown column 'xxxx' in
    > WHERE clause.....
    > where 'xxxx' is the content of $loginPassword[/color]

    Arghl,

    my guess is that you have $loginPassword = 'xxxx';

    -> $uneRequete = "SELECT * FROM Usager WHERE motDePasse = xxxx";

    Should be

    -> $uneRequete = "SELECT * FROM Usager WHERE motDePasse = 'xxxx'";

    --
    Met vriendelijke groeten,
    Tim Van Wassenhove <http://timvw.madoka.be >

    Comment

    • ndsoumah@gmail.com

      #3
      Re: Error 1054: Unknown column xxxx in WHERE clause..

      Thanks for your reply Tim

      But actually, anything I put in the WHERE clause generates the same
      error.....even litterals. I don't know why he thinks it's a column!

      Comment

      • Oli Filth

        #4
        Re: Error 1054: Unknown column xxxx in WHERE clause..

        ndsoumah@gmail. com said the following on 25/06/2005 06:57:[color=blue]
        > Hello Guys
        >
        > I'm trying to run this query
        >
        > $uneRequete = "SELECT * FROM Usager WHERE motDePasse =
        > {$loginPassword }";
        >
        > and I get this error message : Error 1054: Unknown column 'xxxx' in
        > WHERE clause.....
        > where 'xxxx' is the content of $loginPassword
        >
        > I don't know what is going on
        >[/color]

        If you do echo $uneRequete;, what does it give?

        --
        Oli

        Comment

        • ndsoumah@gmail.com

          #5
          Re: Error 1054: Unknown column xxxx in WHERE clause..

          Thanks for your time oli.

          I solved the problem. All I had to do was to place single quotes
          around {$loginPassword }.

          Comment

          Working...