Facebook Apps Error

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

    Facebook Apps Error

    I got this error:

    Invalid query -- UPDATE `games` SET `playcount` = (`playcount`+1) WHERE `id` = $row[id] -- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[id]' at line 1

    help me to solve this problem..
    --------------------------------------------



    // Update playcount
    add_games_played($user);
    add_hit( $_GET[id] );

    $res = query("SELECT * FROM `games` WHERE id = $_GET[id]);

    echo '<table width=100% cellpadding=2 cellspacing=0 class=maintable>';
    while( $row = mysql_fetch_array($res) ) {

    $filename = $appcallbackurl;
    $filename .= "swf/";
    $filename .= $row[nameid];
    $filename .= ".";
    $filename .= strtolower($row['type']);

    echo '<tr><td align=center valign=top><P class=bigBlueP>'.$row[name].'</P></td></tr>';
    LESS TALK. LESS MISTAKE.

    HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

    #2
    $_GET['id']

    Comment


      #3
      oh and fail:
      $res = query("SELECT * FROM `games` WHERE id = $_GET[id]);

      your not closing the query "

      Comment

      Working...
      X