|
@@ -149,6 +149,7 @@ class DB_MYSQL {
|
149
|
149
|
public $LinkID = false;
|
150
|
150
|
protected $QueryID = false;
|
151
|
151
|
protected $StatementID = false;
|
|
152
|
+ protected $PreparedQuery = false;
|
152
|
153
|
protected $Record = [];
|
153
|
154
|
protected $Row;
|
154
|
155
|
protected $Errno = 0;
|
|
@@ -203,8 +204,7 @@ class DB_MYSQL {
|
203
|
204
|
mysqli_set_charset($this->LinkID, "utf8");
|
204
|
205
|
}
|
205
|
206
|
|
206
|
|
- function query_p($Query, &...$BindVars) {
|
207
|
|
- $QueryStartTime = microtime(true);
|
|
207
|
+ function prepare_query($Query, &...$BindVars) {
|
208
|
208
|
$this->connect();
|
209
|
209
|
|
210
|
210
|
$this->StatementID = mysqli_prepare($this->LinkID, $Query);
|
|
@@ -216,13 +216,17 @@ class DB_MYSQL {
|
216
|
216
|
}
|
217
|
217
|
mysqli_stmt_bind_param($this->StatementID, $Types, ...$BindVars);
|
218
|
218
|
}
|
|
219
|
+ $this->PreparedQuery = $Query;
|
|
220
|
+ return $this->StatementID;
|
|
221
|
+ }
|
|
222
|
+
|
|
223
|
+ function exec_prepared_query() {
|
|
224
|
+ $QueryStartTime = microtime(true);
|
219
|
225
|
mysqli_stmt_execute($this->StatementID);
|
220
|
226
|
$this->QueryID = mysqli_stmt_get_result($this->StatementID);
|
221
|
227
|
$QueryRunTime = (microtime(true) - $QueryStartTime) * 1000;
|
222
|
|
- $this->Queries[] = [$Query, $QueryRunTime, null];
|
|
228
|
+ $this->Queries[] = [$this->PreppedQuery, $QueryRunTime, null];
|
223
|
229
|
$this->Time += $QueryRunTime;
|
224
|
|
-
|
225
|
|
- return $this->StatementID;
|
226
|
230
|
}
|
227
|
231
|
|
228
|
232
|
function query($Query, &...$BindVars) {
|
|
@@ -291,11 +295,6 @@ class DB_MYSQL {
|
291
|
295
|
return $this->QueryID;
|
292
|
296
|
}
|
293
|
297
|
|
294
|
|
- function reexec_query() {
|
295
|
|
- mysqli_stmt_execute($this->StatementID);
|
296
|
|
- $this->QueryID = mysqli_stmt_get_result($this->StatementID);
|
297
|
|
- }
|
298
|
|
-
|
299
|
298
|
function query_unb($Query) {
|
300
|
299
|
$this->connect();
|
301
|
300
|
mysqli_real_query($this->LinkID, $Query);
|