Invalid SQL: SELECT pgId FROM pages WHERE pgUrl=''+$(this).data('video')+''