[pLog-svn] r3109 - plog/trunk/class/dao
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Fri Mar 24 03:55:20 GMT 2006
Author: jondaley
Date: 2006-03-24 03:55:20 +0000 (Fri, 24 Mar 2006)
New Revision: 3109
Modified:
plog/trunk/class/dao/blogs.class.php
Log:
a bad query was being created, this way is a little cleaner too, I think
Modified: plog/trunk/class/dao/blogs.class.php
===================================================================
--- plog/trunk/class/dao/blogs.class.php 2006-03-24 03:54:12 UTC (rev 3108)
+++ plog/trunk/class/dao/blogs.class.php 2006-03-24 03:55:20 UTC (rev 3109)
@@ -142,15 +142,16 @@
$statusCond = "";
if( $status != BLOG_STATUS_ALL )
$statusCond = "status = '".Db::qstr($status)."'";
+ $where = $statusCond;
+
$searchCond = "";
- if( $searchTerms != "" )
+ if( $searchTerms != "" ){
$searchCond = $this->getSearchConditions( $searchTerms );
+ if( $where != "" )
+ $where .= " AND" . $searchCond;
+ }
- $where = $statusCond;
if( $where != "" )
- $where .= " AND";
- $where .= $searchCond;
- if( $where != "" )
$where = " WHERE $where";
$query = "SELECT * FROM ".$this->getPrefix()."blogs $where ORDER BY blog";
More information about the pLog-svn
mailing list