[pLog-svn] r547 - plog/trunk/class/dao
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Sun Dec 19 16:55:20 GMT 2004
Author: oscar
Date: 2004-12-19 16:55:20 +0000 (Sun, 19 Dec 2004)
New Revision: 547
Modified:
plog/trunk/class/dao/model.class.php
Log:
added some debugging in case the sql query went wrong
Modified: plog/trunk/class/dao/model.class.php
===================================================================
--- plog/trunk/class/dao/model.class.php 2004-12-19 15:43:49 UTC (rev 546)
+++ plog/trunk/class/dao/model.class.php 2004-12-19 16:55:20 UTC (rev 547)
@@ -94,18 +94,19 @@
*/
function Execute( $query, $page = DEFAULT_PAGING_ENABLED, $itemsPerPage = DEFAULT_ITEMS_PER_PAGE )
{
- // if paging is enabled...
- if( $page > DEFAULT_PAGING_ENABLED ) {
- $start = (($page - 1) * $itemsPerPage);
- $limits = " LIMIT $start, $itemsPerPage";
- $query .= " $limits";
- }
+ // if paging is enabled...
+ if( $page > DEFAULT_PAGING_ENABLED ) {
+ $start = (($page - 1) * $itemsPerPage);
+ $limits = " LIMIT $start, $itemsPerPage";
+ $query .= " $limits";
+ }
- // execute the query
- if( $this->_config->getValue( "db_layer_use_cache" ))
- return $this->CacheExecute( $query );
- else
- return $this->_db->Execute( $query );
+ $result = $this->_db->Execute( $query );
+
+ if( !$result )
+ $this->log->debug( "** Error SQL query **: $query" );
+
+ return( $result );
}
/**
More information about the pLog-svn
mailing list