Jump to content

Insert into table sqlite


GhostXoP

Recommended Posts

Regularly, sqlite is used to store user data from accounts, well what i would like to do is store data into a table.

I dont want to add rows, because only one row would ever be used.

new table -> new row -> DATA

If i am only ever going to use one row, is there a way that i can just do

new table -> data ? so i can just load the data from the table to memory? Rather than selecting from a row?

Link to comment

You might want to check out this page that uses global variables to store data in. However, it is for MySQL and I'm not sure about SQLite.

If it doesn't work, the method of a one-row table isn't that shameful or bad practice. I too have a table called "config", in which I just store only a couple of rows. The names of the columns are "key" and "setting". Nicely semantic and functional.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...