Facebook Apps Error

Started on the old forum in January 2011 · view the original in the archive · old links redirect here

2 replies · 386 views · started 15 years ago · 1 min read

2 participants
robzky Developer · 205 posts #1

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>

'.$row[name].'

</td></tr>';

LESS TALK. LESS MISTAKE.

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

something else Fellow · 2,296 posts #3

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

your not closing the query "

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close