mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Start of LIMIT functionality...got to tired to finish it
git-svn-id: file:///svn/phpbb/trunk@103 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1283c46dcb
commit
3fe77c8d09
1 changed files with 20 additions and 2 deletions
|
@ -95,9 +95,27 @@ class sql_db
|
||||||
unset($this->query_result);
|
unset($this->query_result);
|
||||||
if($query != "")
|
if($query != "")
|
||||||
{
|
{
|
||||||
|
if(eregi("LIMIT", $query))
|
||||||
|
{
|
||||||
|
eregi("^([[:alnum:][:cntrl:] \*\,\'\"\+\.\(\)_=]+)LIMIT ([0-9]+)[, ]*([0-9]+)*", $query, $limits);
|
||||||
|
|
||||||
|
$query = $limits[1];
|
||||||
|
if($limits[3])
|
||||||
|
{
|
||||||
|
$row_offset = $limits[2];
|
||||||
|
$num_rows = $limits[3];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$row_offset = 0;
|
||||||
|
$num_rows = $limits[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->query_result = OCIParse($this->db_connect_id, $query);
|
$this->query_result = OCIParse($this->db_connect_id, $query);
|
||||||
OCIExecute($this->query_result);
|
OCIExecute($this->query_result);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if($this->query_result)
|
if($this->query_result)
|
||||||
{
|
{
|
||||||
unset($this->row[$this->query_result]);
|
unset($this->row[$this->query_result]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue