summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2008-07-29 06:23:50 +0000
committerLester Caine <lester@lsces.co.uk>2008-07-29 06:23:50 +0000
commit0229eff83c859c3ca0177a51b10596149832a17f (patch)
tree08993ff52fe78289de74c3e6769057d90a6426b7
parent809fe1023ab5405de8cbccf707a6f4a84e27b73a (diff)
downloadboards-0229eff83c859c3ca0177a51b10596149832a17f.tar.gz
boards-0229eff83c859c3ca0177a51b10596149832a17f.tar.bz2
boards-0229eff83c859c3ca0177a51b10596149832a17f.zip
Add correct SQL for oracle when using SUBSTR
This should use the ADOdb $substr variable - but even that is not totally correct as Firebird requires SQL2003 format (x FROM s FOR l) so this should probably be a function in ADOdb to return the correct layout.
-rw-r--r--BitBoardTopic.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/BitBoardTopic.php b/BitBoardTopic.php
index bde7223..82f5e41 100644
--- a/BitBoardTopic.php
+++ b/BitBoardTopic.php
@@ -1,13 +1,13 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_boards/BitBoardTopic.php,v 1.48 2008/06/05 22:21:18 wjames5 Exp $
- * $Id: BitBoardTopic.php,v 1.48 2008/06/05 22:21:18 wjames5 Exp $
+ * $Header: /cvsroot/bitweaver/_bit_boards/BitBoardTopic.php,v 1.49 2008/07/29 06:23:50 lsces Exp $
+ * $Id: BitBoardTopic.php,v 1.49 2008/07/29 06:23:50 lsces Exp $
*
* Messageboards class to illustrate best practices when creating a new bitweaver package that
* builds on core bitweaver functionality, such as the Liberty CMS engine
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.48 $ $Date: 2008/06/05 22:21:18 $ $Author: wjames5 $
+ * @version $Revision: 1.49 $ $Date: 2008/07/29 06:23:50 $ $Author: lsces $
* @package boards
*/
@@ -332,6 +332,8 @@ class BitBoardTopic extends LibertyMime {
if ( $this->mDb->mType == 'firebird' ) {
$substrSql = "SUBSTRING(s_lcom.`thread_forward_sequence` FROM 1 FOR 10) LIKE SUBSTRING(lcom.`thread_forward_sequence` FROM 1 FOR 10)";
+ } elseif ( $this->mDb->mType == 'oci8' ) {
+ $substrSql = "SUBSTR(s_lcom.`thread_forward_sequence`, 1, 10) LIKE SUBSTR(lcom.`thread_forward_sequence`, 1, 10)";
} else {
$substrSql = "SUBSTRING(s_lcom.`thread_forward_sequence`, 1, 10) LIKE SUBSTRING(lcom.`thread_forward_sequence`, 1, 10)";
}