select A.* from log A inner join aff B on A.user_id = B.userid where B.refid = and A.status = 1Array ( ) Array ( [0] => 42000 [1] => 1064 [2] => 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 A.status = 1' at line 1 ) Array ( [0] => Array ( [file] => /home/bitcoball/public_html/bitg/vendor/mysql.php [line] => 93 [function] => execute [class] => DBPDO [object] => DBPDO Object ( [pdo] => PDO Object ( ) [error:DBPDO:private] => ) [type] => -> [args] => Array ( [0] => select A.* from log A inner join aff B on A.user_id = B.userid where B.refid = and A.status = 1 [1] => Array ( ) ) ) [1] => Array ( [file] => /home/bitcoball/public_html/affiliate.php [line] => 26 [function] => fetchAll [class] => DBPDO [object] => DBPDO Object ( [pdo] => PDO Object ( ) [error:DBPDO:private] => ) [type] => -> [args] => Array ( [0] => select A.* from log A inner join aff B on A.user_id = B.userid where B.refid = and A.status = 1 ) ) )