[HELP] SQL error

Discussion in 'Plugin Development' started by TechGuard, Aug 18, 2011.

Thread Status:
Not open for further replies.
  1. I get that error when i'm trying to add "o:TechGuard", to a TEXT value.
    Code:
    Error at SQL Query: [SQLITE_ERROR] SQL error or missing database (near ":TechGuard": syntax error)
    No-one?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  2. Offline

    nisovin

    What does the full query look like? Are you quoting the string properly?
     
  3. Code:
    "INSERT INTO iZone (`name`, `list`) VALUES (`test`, `o:TechGuard {} Player`));"
    I separate the players with " {} ", didn't know how to create a string list otherwise.
     
  4. Offline

    nisovin

    The grave marks ` are for denoting field and table names, you need to use single quotes ' (or maybe double quotes ") to denote strings.
     
  5. Offline

    7eggert

    Usually you should not create a list of strings in a table, but make a table with one row for each (name, list item).
     
  6. I changed the ` to /" around the list. But now it gives me this error:
    Code:
    Error at SQL Query: query does not return ResultSet
     
  7. Offline

    nisovin

    Are you trying to read the results of that query? An insert statement won't return a result set.
     
Thread Status:
Not open for further replies.

Share This Page