Hi there, recently I have setup the user promotion in my vbulletin 5.3.2, but when the promotion cron job run, it always get 500 error. I have narrow down the issue to this query

PHP Code:
$sql 
...