Make sure var is an int and remove unused var

Change-Id: I3fd8e42b00dad81d042ba38aed24ba6fd8bbe090
Merge pull request #15 from SemanticMediaWiki/SMW_Sql3SmwIds

Make sure var is an int and remove unused var