March 25th, 2012, 05:05 PM
Join Date: Jun 2002
Well I do not see anything wrong with the actual coding.
The problem is your userid is empty which would seem to suggest your payments table in the user_id field that the userid for the user whom purchased is empty.
Can you confirm?