[pLog-svn] r1730 - plog/branches/plog-1.1-ben/class/dao
ork at devel.plogworld.net
ork at devel.plogworld.net
Tue Apr 5 11:12:52 GMT 2005
Author: ork
Date: 2005-04-05 11:12:52 +0000 (Tue, 05 Apr 2005)
New Revision: 1730
Modified:
plog/branches/plog-1.1-ben/class/dao/blogs.class.php
Log:
removed almost all _db->Execute() calls.. there some ->_db->method calls left and i'll take a look later on ..
Modified: plog/branches/plog-1.1-ben/class/dao/blogs.class.php
===================================================================
--- plog/branches/plog-1.1-ben/class/dao/blogs.class.php 2005-04-05 11:06:39 UTC (rev 1729)
+++ plog/branches/plog-1.1-ben/class/dao/blogs.class.php 2005-04-05 11:12:52 UTC (rev 1730)
@@ -98,7 +98,7 @@
{
$query = "SELECT date FROM ".$this->getPrefix()."articles WHERE blog_id = ".$blogId. " ORDER BY date ASC LIMIT 0,1" ;
- $result = $this->_db->Execute( $query );
+ $result = $this->Execute( $query );
if (!$result)
return false;
@@ -120,7 +120,7 @@
function getBlogUpdateDate( $blogId )
{
$query = "SELECT date FROM ".$this->getPrefix()."articles WHERE blog_id = ".$blogId. " ORDER BY date DESC LIMIT 0,1" ;
- $result = $this->_db->Execute( $query );
+ $result = $this->Execute( $query );
if (!$result)
return false;
@@ -143,7 +143,7 @@
{
$query = "SELECT SUM(num_reads) as total FROM ".$this->getPrefix()."articles WHERE blog_id = ".$blogId;
- $result = $this->_db->Execute( $query );
+ $result = $this->Execute( $query );
if (!$result)
return false;
@@ -165,7 +165,7 @@
function getBlogTotalPosts( $blogId )
{
$query = "SELECT COUNT(*) as total FROM ".$this->getPrefix()."articles WHERE blog_id = $blogId AND status = ".POST_STATUS_PUBLISHED;
- $result = $this->_db->Execute( $query );
+ $result = $this->Execute( $query );
if (!$result)
return false;
@@ -187,7 +187,7 @@
function getBlogTotalComments( $blogId )
{
$query = "SELECT COUNT(*) as total FROM ".$this->getPrefix()."articles_comments AS c, ".$this->getPrefix()."articles AS a WHERE ((a.blog_id = $blogId) AND (a.id = c.article_id)) AND c.status = ".COMMENT_STATUS_NONSPAM;
- $result = $this->_db->Execute( $query );
+ $result = $this->Execute( $query );
if (!$result)
return false;
@@ -209,7 +209,7 @@
function getBlogTotalTrackbacks( $blogId )
{
$query = "SELECT COUNT(*) as total FROM ".$this->getPrefix()."trackbacks AS t, ".$this->getPrefix()."articles AS a WHERE ((a.blog_id = $blogId) AND (a.id = t.article_id))";
- $result = $this->_db->Execute( $query );
+ $result = $this->Execute( $query );
if (!$result)
return false;
@@ -254,6 +254,7 @@
*/
function getBlogSettings( $blogId )
{
+
$query = "SELECT settings FROM ".$this->getPrefix()."blogs WHERE id = ".$blogId;
$result = $this->Execute( $query );
More information about the pLog-svn
mailing list