Line 440 | Line 440 |
---|
{ return false; }
|
{ return false; }
|
| $safe_query_id = $this->clean_query_id($this->query_result);
|
if ($cache && $cache_ttl) {
|
if ($cache && $cache_ttl) {
|
$this->open_queries[(int) $this->query_result] = $this->query_result;
| $this->open_queries[$safe_query_id] = $this->query_result;
|
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl); } else if (strpos($query, 'SELECT') === 0) {
|
$this->query_result = $cache->sql_save($this, $query, $this->query_result, $cache_ttl); } else if (strpos($query, 'SELECT') === 0) {
|
$this->open_queries[(int) $this->query_result] = $this->query_result;
| $this->open_queries[$safe_query_id] = $this->query_result;
|
} } else if ($this->debug_sql_explain)
| } } else if ($this->debug_sql_explain)
|
Line 496 | Line 498 |
---|
$query_id = $this->query_result; }
|
$query_id = $this->query_result; }
|
if ($cache && $cache->sql_exists($query_id))
| $safe_query_id = $this->clean_query_id($query_id); if ($cache && $cache->sql_exists($safe_query_id))
|
{
|
{
|
return $cache->sql_fetchrow($query_id);
| return $cache->sql_fetchrow($safe_query_id);
|
}
if ($query_id)
| }
if ($query_id)
|
Line 544 | Line 547 |
---|
$query_id = $this->query_result; }
|
$query_id = $this->query_result; }
|
if ($cache && $cache->sql_exists($query_id))
| $safe_query_id = $this->clean_query_id($query_id); if ($cache && $cache->sql_exists($safe_query_id))
|
{
|
{
|
return $cache->sql_rowseek($rownum, $query_id);
| return $cache->sql_rowseek($rownum, $safe_query_id);
|
}
if (!$query_id)
| }
if (!$query_id)
|
Line 570 | Line 574 |
---|
}
/**
|
}
/**
|
* {@inheritDoc}
| * {@inheritdoc}
|
*/
|
*/
|
function sql_nextid()
| public function sql_last_inserted_id()
|
{ $query_id = $this->query_result;
| { $query_id = $this->query_result;
|
Line 619 | Line 623 |
---|
$query_id = $this->query_result; }
|
$query_id = $this->query_result; }
|
if ($cache && !is_object($query_id) && $cache->sql_exists($query_id))
| $safe_query_id = $this->clean_query_id($query_id); if ($cache && $cache->sql_exists($safe_query_id))
|
{
|
{
|
return $cache->sql_freeresult($query_id);
| return $cache->sql_freeresult($safe_query_id);
|
}
|
}
|
if (isset($this->open_queries[(int) $query_id]))
| if (isset($this->open_queries[$safe_query_id]))
|
{
|
{
|
unset($this->open_queries[(int) $query_id]);
| unset($this->open_queries[$safe_query_id]);
|
return oci_free_statement($query_id); }
| return oci_free_statement($query_id); }
|