syntax error ???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ben

    syntax error ???

    Hi, on login.php , we can see that :

    (...)

    $sql = "SELECT Login FROM logins
    WHERE Login='$fuserna me'";
    $result = mysql_query($sq l)
    or die("Couldn't execute query1.");

    (...)

    field : login from table: logins

    fusername is a valid form field.

    I just can't understand why I get the message Couldn't execute query1.
    I don't see any syntax error. :-(

    Thank you in advance


    Ben
  • Andy Hassall

    #2
    Re: syntax error ???

    On 30 Sep 2003 15:25:14 -0700, microben@hotmai l.com (Ben) wrote:
    [color=blue]
    >Hi, on login.php , we can see that :
    >
    >(...)
    >
    >$sql = "SELECT Login FROM logins
    > WHERE Login='$fuserna me'";
    > $result = mysql_query($sq l)
    > or die("Couldn't execute query1.");
    >
    >(...)
    >
    >field : login from table: logins
    >
    >fusername is a valid form field.
    >
    >I just can't understand why I get the message Couldn't execute query1.
    >I don't see any syntax error. :-([/color]

    Ask the database for more information; it knows more about the situation:

    $result = mysql_query($sq l)
    or die("Couldn't execute query1 because: " . mysql_error());

    Post that error back here if it doesn't make the problem immediately clear.

    --
    Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
    Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

    Comment

    Working...