<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=DbExec</id>
	<title>DbExec - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=DbExec"/>
	<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=DbExec&amp;action=history"/>
	<updated>2026-08-05T04:55:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://g1r-mp.com/wiki/index.php?title=DbExec&amp;diff=41&amp;oldid=prev</id>
		<title>QCherry: Automatyczna aktualizacja dokumentacji funkcji</title>
		<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=DbExec&amp;diff=41&amp;oldid=prev"/>
		<updated>2026-08-04T12:44:03Z</updated>

		<summary type="html">&lt;p&gt;Automatyczna aktualizacja dokumentacji funkcji&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- This page is generated automatically from the function definition: dbExec. --&amp;gt;&lt;br /&gt;
= dbExec =&lt;br /&gt;
Executes a prepared SQL statement when no row result is required.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dbExec(DatabaseConnection connection, string statement, ...)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Required !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;connection&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;DatabaseConnection&amp;lt;/code&amp;gt; || yes || The connection used to execute the statement.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;statement&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || yes || SQL containing &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; value placeholders.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;nil/bool/number/string&amp;lt;/code&amp;gt; || no || Values bound to the placeholders.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; when the statement is queued successfully; otherwise returns &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Update a player&amp;#039;s level safely:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; line&amp;gt;&lt;br /&gt;
local ok = dbExec(db,&lt;br /&gt;
    &amp;quot;UPDATE players SET level = ? WHERE id = ?&amp;quot;,&lt;br /&gt;
    newLevel,&lt;br /&gt;
    playerId&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
if not ok then&lt;br /&gt;
    outputDebugString(&amp;quot;Could not queue level update&amp;quot;, 1)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Available only in server-side resource scripts.&lt;br /&gt;
* Use placeholders instead of concatenating untrusted values into SQL.&lt;br /&gt;
&lt;br /&gt;
[[Category:Server Functions]]&lt;br /&gt;
[[Category:Database Functions]]&lt;/div&gt;</summary>
		<author><name>QCherry</name></author>
	</entry>
</feed>