Changeset 501 for trunk/phpbms/include
- Timestamp:
- 04/21/09 11:08:21 (3 years ago)
- Files:
-
- 1 modified
-
trunk/phpbms/include/post_class.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/include/post_class.php
r499 r501 9 9 var $maintable = ""; 10 10 var $datefieldname = ""; 11 var $notpostedCriteria = ""; 11 12 12 13 function tablePost($db, $modifiedby = NULL){ … … 22 23 23 24 24 function getRecordsToPost($startdate , $enddate){25 function getRecordsToPost($startdate = null, $enddate = null){ 25 26 // This function creates an array of 26 27 // record ids within the date range given … … 34 35 `".$this->maintable."` 35 36 WHERE 36 `".$this->maintable."`.readytopost = 1 37 `".$this->maintable."`.readytopost = 1"; 38 39 if($startdate){ 40 41 $querystatement .= " 37 42 AND `".$this->maintable."`.`".$this->datefieldname."` >= '".dateToString($startdate, "SQL")."' 38 43 AND `".$this->maintable."`.`".$this->datefieldname."` <= '".dateToString($enddate, "SQL")."'"; 39 44 45 }//endif 46 47 if($this->notpostedCriteria){ 48 49 $querystatement .= " 50 AND ".$this->notpostedCriteria; 51 52 }//endif 53 40 54 $queryresult = $this->db->query($querystatement); 41 55 42 while($the cord = $this->db->fetchArray($queryresult))56 while($therecord = $this->db->fetchArray($queryresult)) 43 57 $idarray[] = $therecord["id"]; 44 58 … … 53 67 // segment using 'IN' 54 68 55 $where = "`".$this->maintable."`.id IN";69 $where = "`".$this->maintable."`.id "; 56 70 if(count($idarray)) 57 71 $where .= " IN(".implode(",", $idarray).")";