Invalid SQL: SELECT tmId FROM team WHERE tmFirstName=''+$(this).data('video')+'' AND tmSurname=''