コード例 #1
0
 /**
  * set up the joins
  *
  * @param string $db 
  * @return void
  * @author Andy Bennett
  */
 function get_joins()
 {
     $t = parent::get_table();
     $joins = array();
     $joins[] = steamcore::array_object(array('table' => 'uploads AS u', 'on' => $t . '.upload = u.id'));
     #$joins[] = steamcore::array_object( array('table' => 'galleries AS s', 'on' => $t.'.gallery = s.id') );
     return $joins;
 }
コード例 #2
0
 /**
  * get the where query
  *
  * @param string $w 
  * @return void
  * @author Andy Bennett
  */
 function get_where($w = null)
 {
     if (!is_null($w)) {
         $where = array_merge($w, $where);
     }
     $t = parent::get_table();
     $where[$t . '.show'] = '1';
     return $where;
 }