SQLite3 does have variables.  

You set them by binding values to an SQL statement, and retrieve them by 
retrieving column values resulting from the execution of an SQL Statement.  For 
example:

sqlite3_prepare('select var1, var2 from table1 where val3=?;')

You bind a value to the val3 variable using one of the bind functions, then 
when you sqlite3_step the statement, you can use sqlite3_column_xxx to retrieve 
the value of the var1 and var2 variables.

Or did you have something else in mind?


---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.


>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Stephen Chrzanowski
>Sent: Friday, 18 January, 2019 18:52
>To: General Discussion of SQLite Database
>Subject: [sqlite] Variable Declaration
>
>Tonight, I wanted to write up a small database to keep tabs on
>certain
>things I've done in a game, and show me new tasks I can do based on
>what
>I've completed.  I have a full list of items, and what pairs of items
>I
>need to poses to get the next thing, but, getting the data into the
>DB is
>tedious.   I'm still going to do it, but, the thought of using
>variables
>came to mind, and apparently this isn't something that's supported?
>
>I've seen long wind answers to how this can be completed on
>stackoverflow,
>and other sites, and for this one-time thing I'm doing, I'm not
>really
>interested in those proposals.
>
>So for now, trudging on without, but, has there been recent
>discussions or
>any plans on introducing variables to SQLite?  I know it's a bit of
>fluff,
>and the whole "Keeping it light" thing, but, it's kind of useful in
>some
>cases.
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to