function _pathauto_sql_concat in Pathauto 6.2
Same name and namespace in other branches
- 6 pathauto.module \_pathauto_sql_concat()
Return the proper SQL to perform cross-db and field-type concatenation.
Return value
A string of SQL with the concatenation.
5 calls to _pathauto_sql_concat()
- 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 218 - Main file for the Pathauto module, which automatically generates aliases for content.
Code
function _pathauto_sql_concat() {
$args = func_get_args();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
return 'CONCAT(' . implode(', ', $args) . ')';
default:
// The ANSI standard of concatentation uses the double-pipe.
return '(' . implode(' || ', $args) . ')';
}
}