Forum Moderators: coopster
SELECT...
FROM..
WHERE..
ORDER by location_work", $colname_rs_year);
$rs_year = mysql_query($query_rs_year, $immapp) or die(mysql_error());
$row_rs_year = mysql_fetch_assoc($rs_year);
$totalRows_rs_year = mysql_num_rows($rs_year);
<!-- lines above select return rows. Lines below output xml --!>
$xml_output = "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?> <?xml-stylesheet type=\"text/xsl\" href=\"X3D-XSLT_Work_Year.xsl\"?>\n";
$xml_output .= "<works>\n";
for($x = 0 ; $x < mysql_num_rows($rs_year) ; $x++){
$row_rs_year = mysql_fetch_assoc($rs_year);
$xml_output .= "\t<work>\n";
$xml_output .= "\t\t<Work_Year>" . $row_rs_year['year_work'] . "</Work_Year>\n";
$xml_output .= "\t\t<Work_ID>" . $row_rs_year['id_work'] . "</Work_ID>\n";
$xml_output .= "\t\t<Work_Image>" . $row_rs_year['image_image'] . "</Work_Image>\n";
$xml_output .= "\t\t<Artist_Second_Name>" . $row_rs_year['2ndname_artist'] . "</Artist_Second_Name>\n";
$xml_output .= "\t\t<Work_Name>" . $row_rs_year['name_work'] . "</Work_Name>\n";
$xml_output .= "\t\t<Work_Type>" . $row_rs_year['worktype_work'] . "</Work_Type>\n";
$xml_output .= "\t</work>\n ";
}
$xml_output .= "</works>\n";
$filename = 'XML-WORK_YEAR-' . $row_rs_year['year_work'] . '.xml';
<!-- this line above is where i think i have a problem. what happens now is the file is made XML-WORK_YEAR-.xml, and the string is not recognised. I need XML-WORK_YEAR-1978.xml, XML-WORK_YEAR-1986.xml, XML-WORK_YEAR-1994.xml etc --!>
i can't figure it out
Any ideas?
Many thanks
Milo