<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://solarstrike.net/wiki/index.php?action=history&amp;feed=atom&amp;title=SQL_Module</id>
	<title>SQL Module - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://solarstrike.net/wiki/index.php?action=history&amp;feed=atom&amp;title=SQL_Module"/>
	<link rel="alternate" type="text/html" href="https://solarstrike.net/wiki/index.php?title=SQL_Module&amp;action=history"/>
	<updated>2026-10-29T13:00:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://solarstrike.net/wiki/index.php?title=SQL_Module&amp;diff=1224&amp;oldid=prev</id>
		<title>Elverion: Created page with &quot;== open == &#039;&#039;&#039;sqlitedb sqlite.open(string filename)&#039;&#039;&#039;  Open an SQLite database file and return a handle to the database. If the file does not exist, it will be created for yo...&quot;</title>
		<link rel="alternate" type="text/html" href="https://solarstrike.net/wiki/index.php?title=SQL_Module&amp;diff=1224&amp;oldid=prev"/>
		<updated>2016-02-25T18:01:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== open == &amp;#039;&amp;#039;&amp;#039;sqlitedb sqlite.open(string filename)&amp;#039;&amp;#039;&amp;#039;  Open an SQLite database file and return a handle to the database. If the file does not exist, it will be created for yo...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== open ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;sqlitedb sqlite.open(string filename)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Open an SQLite database file and return a handle to the database. If the file does not exist, it will be created for you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== close ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;sqlite.close(sqlitedb db)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close an opened SQLite database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== execute ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;table sqlite.execute(sqlitedb db, string query)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Run a query on an opened SQLite database. Returns a table of results where each result is a table of field/value pairs. For example, pretend table &amp;#039;people&amp;#039; contains the fields &amp;#039;id&amp;#039;, &amp;#039;first_name&amp;#039;, and &amp;#039;last_name&amp;#039;. A query to grab known people might look like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
db = sqlite.open(&amp;quot;examples.db&amp;quot;);&lt;br /&gt;
results = sqlite.execute(db, &amp;quot;SELECT * from `people`&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
print(&amp;quot;Results:\nID\tFirst Name\tLast Name&amp;quot;);&lt;br /&gt;
for id,result in pairs(results) do&lt;br /&gt;
	printf(&amp;quot;\t%d\t%s\t%s\n&amp;quot;, result.id, result.first_name, result.last_name);&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output of which should look something like:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Results:&lt;br /&gt;
	ID	First Name	Last Name&lt;br /&gt;
	1	John		Smith&lt;br /&gt;
	2	Jane		Doe&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Elverion</name></author>
	</entry>
</feed>