Query Error: SELECT uid,friendid FROM pw_friends WHERE uid= AND friendid=397

The URL Is:
http://www.jx640.com/bbs/read.php?fpage=810&page=e&tid=5604015

MySQL Server Error:
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 'AND friendid=397' at line 1 ( 1064 )

You Can Get Help In:
http://www.phpwind.net