Error:





SELECT PaymentId, Amount, A.Credits, D.PaymentStatus, C.PaymentMethod, A.PaymentStatus AS PaymentStatusId, PaymentDtTm, Currency FROM tbl_gf_payment_status D, tbl_gf_payments A, tbl_gf_payment_methods C WHERE A.PaymentMethod = C.PaymentMethodId AND A.PaymentStatus = D.PaymentStatusId AND A.UserId = AND ByAdmin = '1' ORDER BY PaymentId DESC LIMIT 0, 5

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 ByAdmin = '1' ORDER BY PaymentId DESC LIMIT 0, 5' at line 3