Location: PHPKode > projects > Conquest Flex Viewer > getSeries.php
<?xml version="1.0"?>
<Series>
<?php
	include("inc/settings.php");
	$sId = $_GET["id"];
	$sModality = $_GET["m"];
	$sql = "SELECT * FROM dicomseries WHERE studyInsta = '$sId'";
	@mysql_connect($dbhost,$dbuser,$dbpass) or die("ERROR--CAN'T CONNECT TO SERVER");
	@mysql_select_db($dbname) or die("ERROR--CAN'T CONNECT TO DB");
	$res = mysql_query($sql) or die("Error: " . mysql_error());
	$num 	= mysql_num_rows($res);
	for($i=0;$i<$num;$i++)
	{
		$sInst = mysql_result($res,$i,"SeriesInst");
		$sDesc = mysql_result($res,$i,"SeriesDesc");
		$sModality = mysql_result($res,$i,"Modality");
		$sql2 = "SELECT COUNT(*) AS numImages FROM dicomimages where seriesinst = '$sInst'";
		$res2 = mysql_query($sql2) or die("Error: " . mysql_error());
		$numImages = mysql_result($res2,0,"numImages");		
		?>
			<series>
				<seriesInst><?php echo $sInst; ?></seriesInst>
				<seriesDesc><?php echo $sDesc; ?></seriesDesc>
				<modality><?php echo $sModality; ?></modality>
				<numImages><?php echo $numImages; ?></numImages>
			</series>
			<?php
	}
?>
</Series>
Return current item: Conquest Flex Viewer