#1
  1. No Profile Picture
    Ulrik N
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi there!
    I have some problems when trying to update a table... This is what I want to do:

    $queryStr2 = "UPDATE Contents SET information=$text WHERE userId=$id and year=$year and month=$month and day=$day";

    It just dont work out.
    And Yes i have UPDATE rights.

    Anyone?

    ------------------
    -ulrik-
  2. #2
  3. No Profile Picture
    rod k
    Guest
    Devshed Newbie (0 - 499 posts)
    You need to place quotes around the variables unless you know the information to be numeric.

    $queryStr2 = "update Contents set information='$text' where userId='$id' and year='$year' and month='$month' and day='$day'";
  4. #3
  5. No Profile Picture
    Ulrik N
    Guest
    Devshed Newbie (0 - 499 posts)
    Thanks!

    I should have thought of that.

    ------------------
    -ulrik-

Similar Threads

  1. Replies: 18
    Last Post: May 6th, 2004, 01:23 PM
  2. problems with INSERT, UPDATE AND DELETE with MS Access
    By josecito76 in forum PHP Development
    Replies: 0
    Last Post: December 9th, 2003, 08:11 PM
  3. unknown problems with update function
    By Fizlar in forum PHP Development
    Replies: 2
    Last Post: November 9th, 2003, 05:03 PM
  4. update table data from md array
    By MikePeterson in forum MySQL Help
    Replies: 2
    Last Post: July 18th, 2003, 02:16 AM
  5. speed up update
    By bunjee in forum MySQL Help
    Replies: 4
    Last Post: February 5th, 2003, 03:13 PM

IMN logo majestic logo threadwatch logo seochat tools logo