mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +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,8 +95,26 @@ class sql_db
|
|||
unset($this->query_result);
|
||||
if($query != "")
|
||||
{
|
||||
$this->query_result = OCIParse($this->db_connect_id, $query);
|
||||
OCIExecute($this->query_result);
|
||||
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);
|
||||
OCIExecute($this->query_result);
|
||||
}
|
||||
}
|
||||
if($this->query_result)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue