function _pathauto_sql_count in Pathauto 6.2
Return the proper SQL to perform a simple count query.
This is an internal Pathauto function and should not be used in any other modules.
Parameters
$sql: A simple SQL query string.
Return value
The count query SQL string.
5 calls to _pathauto_sql_count()
- blog_pathauto_bulk_update_batch_process in ./
pathauto.pathauto.inc - Batch processing callback; Generate aliases for blogs.
- forum_pathauto_bulk_update_batch_process in ./
pathauto.pathauto.inc - Batch processing callback; Generate aliases for forums.
- node_pathauto_bulk_update_batch_process in ./
pathauto.pathauto.inc - Batch processing callback; Generate aliases for nodes.
- taxonomy_pathauto_bulk_update_batch_process in ./
pathauto.pathauto.inc - Batch processing callback; Generate aliases for taxonomy terms.
- user_pathauto_bulk_update_batch_process in ./
pathauto.pathauto.inc - Batch processing callback; Generate aliases for users.
File
- ./
pathauto.module, line 242 - Main file for the Pathauto module, which automatically generates aliases for content.
Code
function _pathauto_sql_count($sql) {
$sql = preg_replace('/SELECT .* FROM/', 'SELECT COUNT(*) FROM', $sql);
$sql = preg_replace('/ORDER BY .*/', '', $sql);
return $sql;
}