Web Analytics Made Easy -
StatCounter Simple Mysql INSERT Problem - CodingForum

Announcement

Collapse
No announcement yet.

Simple Mysql INSERT Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple Mysql INSERT Problem

    This probably has a really simple answer, but my INSERT code isnt working.
    It looks like this:
    PHP Code:
    mysql_query('INSERT INTO `members` 
            (`id`, `uname`, `uemail`, `upass`, `GUID`, `data`, `permissions`) 
            VALUES ('
    NULL', $psuser, $psemail, $psPassword, 'NULL', 'NULL', '1')'); 
    And I get an error saying
    unexpected T_STRING .
    Please Help
    Thanks,
    ttttt
    http://openoffice.org/- Microsoft Office without the Microsoft.
    [home page][forum]
    Versatile, free software

  • #2
    You are using single quotes to enclose the entire string but then inside the string you are using single quotes. You can get around this a couple of ways-- use double quotes to enclose the string or escape the single quotes inside the string with backslashes.

    Comment


    • #3
      It worked! (Sorry, I'm not used to this strange experience).
      Thanks a lot!!!!
      ttttt
      http://openoffice.org/- Microsoft Office without the Microsoft.
      [home page][forum]
      Versatile, free software

      Comment

      Working...
      X