moneynetworkgroup39
Member
- Messages
- 92
- Reaction score
- 1
- Points
- 8
Presently I am working on a chart script using fusion power chart for my website. This chart requires xml. I am trying to generate the chart from mysql using php and dom.
the xml appears like this
I have successfully able to fetch data from mysql now I have stucked with two points.
First is in the chart I have to increase x value by 1 for each fetched column. I have tried by count like
But my problem is if I use count then I have some problem on count I have tried to print the count value by
No here If I fetch data from 3 column then count appearing not 3 it's appearing like 111.
And second problem is that I have tried to place the fetched data with foreach in dom like below
But If I do this then I am able to generate xml script but it's only one row value appearing like if fetched 3 rows then one row's value dome getting rest of 2 not.
Can any one tell me how to figure this out. I am not asking for code help I am just asking for the Ideas. I will really appreciate if any one help me about this.
Thanks
the xml appears like this
Code:
<dataset>
<set open="24.6" high="25.24" low="24.58" close="25.19" x="1" volume="17856350"/>
<dataset>
<set open="24.6" high="25.24" low="24.58" close="25.19" x="2" volume="17856350"/>
First is in the chart I have to increase x value by 1 for each fetched column. I have tried by count like
Code:
$count=count($row['open']);
$counts=($x<=$count, $x++)
Code:
$count=count($row['open']);
{
echo $count;
}
And second problem is that I have tried to place the fetched data with foreach in dom like below
Code:
$elements=($row['open']);
foreach($elements as $key=>$value){
$element=$dom->createTextNode($value);
$chart->appendChild($element);
}
Can any one tell me how to figure this out. I am not asking for code help I am just asking for the Ideas. I will really appreciate if any one help me about this.
Thanks