QUESTION 1
I am trying to dynamically draw a graph based on data from a Pagesetter document. I have found a nice little flash setup that will, on the fly create the chart based on an XML file. Found here: http://www.maani.us/…p?menu=Introduction
This is fantastic except I am at a bit of a loss as to how to get the data out of the DB and into an XML file. I have found this method of, using a PHP script grabbing the data and sticking it into an XML file and it appears this is what I'm going to have to do. Found here: http://www.zend.com/…utorial-DOM-XML.php
Cool, right? Yeah that's what I thought.
So I need some help with the SQL syntax etc... To make the initial grab of the data I have come up with this so far:
Code
SELECT DISTINCT pg_fieldX FROM pagesetter_pubdataY WHERE pg_creator EQ XXXXXXX ORDERBY pg_created ASC
I haven't tried but I think this will grab the contents of fieldX from a Pagesetter publication Y when the publication creator is equal to XXXXXX and order it by the date created, ascending.
The XXXXXX is supposed to be the postnuke user id of the current user using the script. (this script will be stuck into a Pagesetter template and called every time the user views the template.) How do I retrieve the PN id and use it inthe SQL call?
QUESTION 2
Currently I will use this line of PHP code to create the XML file:
Code
// create a new XML document
$doc = domxml_new_doc('1.0');
$doc = domxml_new_doc('1.0');
How do I ammend that code so that the XML file created is saved as "chart_X" where X is the PN user id? I need this so that each user has their own XML file created so to avoid data mixing...
