Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c93ab2a2
Commit
c93ab2a2
authored
Nov 09, 2002
by
Dries
Browse files
- Added a db_query_range function. Patch by Natrak, slightly modified.
parent
c2f5ce82
Changes
2
Hide whitespace changes
Inline
Side-by-side
includes/database.mysql.inc
View file @
c93ab2a2
...
...
@@ -117,4 +117,36 @@ function db_affected_rows() {
return
mysql_affected_rows
();
}
/**
* Generates a limited query
*
* @param string $query query
* @param integer $from the row to start to fetching
* @param integer $count the numbers of rows to fetch
*
* @return mixed a DB_Result object or a DB_Error
*
* @access public
*/
function
db_query_range
(
$query
,
$from
,
$count
)
{
$query
.
=
" LIMIT
$from
,
$count
"
;
// TODO: debug version
return
db_query
(
$query
);
}
/**
* Generates a limited query
*
* @param string $query query
* @param integer $from the row to start to fetching
* @param integer $count the numbers of rows to fetch
*
* @access public
*/
function
db_query_range
(
$query
,
$from
,
$count
)
{
$query
.
=
" LIMIT
$from
,
$count
"
;
// TODO: debug version
return
db_query
(
$query
);
}
?>
\ No newline at end of file
includes/database.pear.inc
View file @
c93ab2a2
...
...
@@ -112,4 +112,20 @@ function db_affected_rows() {
return
$db_handle
->
affectedRows
();
}
?>
\ No newline at end of file
/**
* Generates a limited query
*
* @param string $query query
* @param integer $from the row to start to fetching
* @param integer $count the numbers of rows to fetch
*
* @return mixed a DB_Result object or a DB_Error
*
* @access public
*/
function
db_query_range
(
$query
,
$from
,
$count
)
{
return
DB
::
limitQuery
(
$query
,
$from
,
$count
);
}
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment