0 AND i.Num = f.Owner ".$Hash; $xml = "\r\n <".$_GET['type'].">"; $result = mysql_query($query,$conn)or die("Error"); if (mysql_num_rows($result)>0){ if(strcasecmp($_GET["type"],"catalog")==0){ while ($row = mysql_fetch_assoc($result)){ $price=(($row['fprice'])==NULL)?$row['iprice']:$row['fprice']; $xml .= " {$row['orig']} ".$row['iname']." ".$row['hash']." ".$row['cat']." ".$row['cname']." ".$row['pages']." ".$row['size']." Yes ".$price." ".trim($row['name'])." server "; } }else{ while ($row = mysql_fetch_assoc($result)){ $xml .= " ".$row['category']." ".$row['issueid'].""; if(!empty($row['market'])) $xml .= "".$row['market'].""; $xml .= "".$row['publisherid']." ".$row['subcategory']." "; } } $xml .= ""; echo $xml; }; ?>