mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Unset $this->_last_stmt before next query
This commit is contained in:
parent
f190e07f83
commit
f07afe9c58
1 changed files with 5 additions and 0 deletions
|
|
@ -165,6 +165,7 @@ class DB
|
|||
}
|
||||
|
||||
// Create and return a prepared statement.
|
||||
$this->_last_stmt = null;
|
||||
$this->_last_stmt = $this->_handle->prepare($statement, $driver_options);
|
||||
return $this->_last_stmt;
|
||||
}
|
||||
|
|
@ -202,6 +203,7 @@ class DB
|
|||
}
|
||||
|
||||
// Execute either a prepared statement or a regular query depending on whether there are arguments.
|
||||
$this->_last_stmt = null;
|
||||
if (count($args))
|
||||
{
|
||||
$this->_last_stmt = $this->_handle->prepare($query_string);
|
||||
|
|
@ -337,6 +339,7 @@ class DB
|
|||
}
|
||||
|
||||
$this->_query_id = $query_id;
|
||||
$this->_last_stmt = null;
|
||||
if (count($query_params))
|
||||
{
|
||||
$this->_last_stmt = $this->_handle->prepare($query_string);
|
||||
|
|
@ -421,6 +424,7 @@ class DB
|
|||
$query_string .= "\n" . sprintf('/* %s %s */', $query_id, \RX_CLIENT_IP);
|
||||
}
|
||||
|
||||
$this->_last_stmt = null;
|
||||
if (count($query_params))
|
||||
{
|
||||
$this->_last_stmt = $this->_handle->prepare($query_string);
|
||||
|
|
@ -488,6 +492,7 @@ class DB
|
|||
$query_string .= "\n" . sprintf('/* _query() %s */', \RX_CLIENT_IP);
|
||||
}
|
||||
|
||||
$this->_last_stmt = null;
|
||||
$this->_last_stmt = $this->_handle->query($query_string);
|
||||
return $this->_last_stmt;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue