|
From: Benjamin C. <bc...@us...> - 2001-11-02 04:21:44
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv6469
Modified Files:
include.php
Log Message:
Abstract db concatting
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- include.php 2001/10/31 02:30:42 1.70
+++ include.php 2001/11/02 04:21:41 1.71
@@ -49,6 +49,16 @@
}
}
+ // Handle the different types of concats
+ function concat() {
+ $pieces = func_get_args();
+ if (DB_TYPE == 'pgsql') {
+ return delimit_list(' || ', $pieces);
+ } else {
+ return 'concat('. delimit_list(', ', $pieces).')';
+ }
+ }
+
function grab($q_string = '') {
if ($q_string) $this->query($q_string);
$this->next_record();
|