in reply to Re^2: Unable to run SQL queryin thread Unable to run SQL query
Try putting the prepare back in with $heredoc as its parameter.