I can run this query on the database in the executeSQL tab and it runs like a charm. But trying to put this in a string I keep getting literal errors and exceptions when it runs. I cannot get the single apostrophes into the string without it thinking they are literals. Is there a better way to get a count of the specific items in a column?
database.executeQuery("SELECT COUNT(*) AS TOTAL FROM 'npcs' WHERE 'name' LIKE '"+playernm+"'__")){ This line is without trying to get the literal apostrophes but adding wild cards at the end.
Is there is better way to get a count of the names in the WorldDatabase.Target.Npcs ? The Total part was an attempt to extract the Total without the Resultsset. I get nothing but exceptions so I am sure it is likely syntax in the command string.