/[drupal]/contributions/modules/qb/modules/qb_data/includes/qb_data.admin.inc
ViewVC logotype

Diff of /contributions/modules/qb/modules/qb_data/includes/qb_data.admin.inc

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

revision 1.2, Sun Feb 8 03:53:49 2009 UTC revision 1.3, Tue Feb 17 20:44:29 2009 UTC
# Line 1  Line 1 
1  <?php // $Id: qb_data.admin.inc,v 1.1 2009/02/04 00:08:12 vauxia Exp $  <?php // $Id: qb_data.admin.inc,v 1.2 2009/02/08 03:53:49 vauxia Exp $
2    
3  /**  /**
4   * List and manage available queries.   * List and manage available queries.
# Line 214  function qb_data_queries($active_only = Line 214  function qb_data_queries($active_only =
214  }  }
215    
216  /**  /**
  * List all values we have created and/or imported from Quickbooks.  
  */  
 function qb_data_values($qdid, $active_only = TRUE, $pending_only = FALSE) {  
   $values = array();  
   $where = array();  
   
   $sql = "SELECT * FROM {qb_data_value} WHERE qdid = %d";  
   if ($active_only) $sql .= " AND status = 1";  
   if ($pending_only) $sql .= " AND pending = 1";  
   $sql .= " ORDER by qb_name";  
   
   $res = db_query($sql, $qdid);  
   while ($row = db_fetch_object($res)) $values[$row->qvid] = $row;  
   return $values;  
 }  
   
 /**  
  * Return the value of an individual record.  
  */  
 function qb_data_value($qdid, $name) {  
   
   // Accept our unique id.  
   if (is_numeric($name)) return(db_fetch_object(db_query("SELECT *  
     FROM {qb_data_value}  
     WHERE qdid = %d AND qdid = %d", $qdid, $name)));  
   
   // Use the FullName value instead, as it's unique for each list type.  
   return(db_fetch_object(db_query("SELECT *  
     FROM {qb_data_value}  
     WHERE qdid = %d AND qb_name = %d", $qdid, $name)));  
 }  
   
 /**  
217   * A list of queries we'd recommend you use, with slightly better names.   * A list of queries we'd recommend you use, with slightly better names.
218   */   */
219  function _qb_data_recommended_queries() {  function _qb_data_recommended_queries() {

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

  ViewVC Help
Powered by ViewVC 1.1.2