предложение дружбы

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 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 ok_f=0' at line 1' in /pub/home/svtkachen/vseturisty/class/Friend.php:24 Stack trace: #0 /pub/home/svtkachen/vseturisty/class/Friend.php(24): PDO->query('select * from f...') #1 /pub/home/svtkachen/vseturisty/edit/friend.php(17): Friend::Newadd('30155') #2 {main} thrown in /pub/home/svtkachen/vseturisty/class/Friend.php on line 24