All pastes #434284 Raw Edit

Unnamed

public php v1 · immutable
·published 2007-04-11 10:14 UTC
rendered paste body
[...]if( PEAR::isError( $news_res = &$this->db->query($sql) ) ) {  die($news_res->getMessage());}			$newsArr = array();		//Walk trough all newswhile($news_res->fetchInto($news_row)) {/* Array auslesen bla bla */  /* Alle Kategorien, zu der der Eintrag gehört, ermitteln */  $cat_sql = "SELECT cat_id FROM cat_to_news WHERE news_id = '" . $news_row[1] . "'";										  if( PEAR::isError( $cat_res = &$this->db->query($cat_sql) ) ) {    die($cat_res->getMessage());  }				  $catArr = array();				  //Write all categorie_ids in an array  while($cat_res->fetchInto($cat_row)) {    array_push($catArr, $cat_row[0]);  }				  $tmpArr['categorie_ids'] = $catArr;				  array_push($newsArr, $tmpArr);				}[...]