SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Update Query

  1. #1
    SitePoint Zealot
    Join Date
    May 2001
    Location
    UK
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Update Query

    OK, I have the following code.
    PHP Code:
    $SQL "UPDATE Newsletter_Members SET downloads=1 WHERE ID=$ID";
    $result mysql_query($sql); 
    Been playing with it for some time, but don't see why it doesn't work. It doesn't give any error message either.

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Variable names ar ecase sensitive in PHP, so $sql contains nothing but $SQL contains your query. So use

    PHP Code:
    $result mysql_query($SQL); 
    not

    PHP Code:
    $result mysql_query($sql); 
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •