/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/widgets/data_list/ADODBSQLDataListSource.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/widgets/data_list/ADODBSQLDataListSource.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jonen, Thu Jan 30 03:29:46 2003 UTC revision 1.2 by jonen, Thu May 6 12:59:55 2004 UTC
# Line 82  class ADODBSQLDataListSource extends SQL Line 82  class ADODBSQLDataListSource extends SQL
82          $this->_db = &$db;          $this->_db = &$db;
83      }      }
84    
85        /**
86             * This is the function that does the data fetching,
87             * and sorting if needed.  
88             * If the source is a sql database, this is where the
89             * query gets called.  This function doesn't actually read the
90             * data from the DB yet.  That is what get_next_data_row()
91             * does.
92         *  
93             * @return boolean - the query passed/failed.
94             */
95          function do_query() {          function do_query() {
96                  $this->_result = $this->_db->SelectLimit($this->_query,                  $this->_result = $this->_db->SelectLimit($this->_query,
97                                                                                                   $this->get_limit(),                                                                                                   $this->get_limit(),
98                                                                                                   $this->get_offset());                                                                                                   $this->get_offset());
99                  if (!$this->_result) {                  if (!$this->_result) {
100                          $msg = $this->_result->ErrorMsg();                          $msg = $this->_db->ErrorMsg();
101                          user_error("ADODBSQLDataListSource::do_query() - query failed : ".$msg);                          user_error("ADODBSQLDataListSource::do_query() - query failed : ".$msg);
102                  }              return false;
103                    } else {
104                return true;
105            }
106          }          }
107    
108                    
# Line 128  class ADODBSQLDataListSource extends SQL Line 141  class ADODBSQLDataListSource extends SQL
141                  $query = "select count(".$count_clause.") as COUNT from ".$tables." ".$where_clause;                  $query = "select count(".$count_clause.") as COUNT from ".$tables." ".$where_clause;
142          $result = $this->_db->Execute($query);          $result = $this->_db->Execute($query);
143                  if (!$result) {                  if (!$result) {
144                          $msg = $result->ErrorMsg();                          $msg = $this->_db->ErrorMsg();
145                          user_error("ADODBSQLDataListSource::count() - query failed : ".$msg);                          user_error("ADODBSQLDataListSource::count() - query failed : ".$msg);
146                  }                  }
147                  $value = $result->FetchRow();                  $value = $result->FetchRow();

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed