bender

Members
  • Content count

    37
  • Joined

  • Last visited

Everything posted by bender

  1. hi Arindam! Actually I've found out what's wrong...there's nothing wrong with the coding, but the database is wrong! Some rows for the date doesn't have values for VWP-10, so it's blank there. So I try filling in the blanks with 0's and the graph appears without errors! thanks for helping me and my problem with Access is solved. Now, my graph is very small for a graph which holds lots of data...can you teach me how to make it larger? thank you so much...you can take a look at my current graph in attachment..
  2. My database name is 'DMU' and inside it contains many tables...but this particular table that I want to include is called 'DPD-BTU-VWP'...inside this table contains attributes: ID, Date, Res lvl, VWP-1 until VWP-21... So I wanna select 5 set of data (VWP-10 until VWP-14) and plot it so that x-axis is the date, and there will be 5 lines to plot according to VWP. Lol I hope you understand what I'm trying to say. Thanks for helping!
  3. Hi Arindam, Thanks for helping me...I've tried your solution, but I get a new error... Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '[VWP-10]='., SQL state 37000 in SQLExecDirect in C:wampwwwJPS Projekel79.php on line 56 37000 Why is this? I wrote it like this: "SELECT [VWP-10] FROM [DPD-BTU-VWP] WHERE [VWP-10]=" .$ors['VWP-10']; Can you please check what's wrong? Thank you very much..
  4. <?php //In this example, we show how to connect FusionCharts to a database. //For the sake of ease, we've used an MySQL databases containing two //tables. // Connect to the DB $link = connectToDB(); //$strXML will be used to store the entire XML document generated //Generate the chart element $strXML = " SYAxisName='Quantity' numberPrefix='$' formatNumberScale='0'>"; // Fetch all records $strQuery = "select * from Salexp"; $result = odbc_exec($link, $strQuery) or die(odbc_error()); //Iterate through each product if ($result) { while($ors = odbc_fetch_array($result)) { //Now create a second query to get details $strQuery = "SELECT COUNT(revenue) as totrevenue FROM Salexp WHERE product=" . $ors['product']; $result2 = odbc_exec($link, $strQuery) or die(odbc_error()); $ors2 = odbc_fetch_array($result2); $strQuery = "select profit from Salexp where product=" .$ors['product']; $result3 = odbc_exec($link, $strQuery) or die(odbc_error()); $ors3 = odbc_fetch_array($result3); $strQuery = "select quantity from Salexp where product=" .$ors['product']; $result4 = odbc_exec($link, $strQuery) or die(odbc_error()); $ors4 = odbc_fetch_array($result4); //Generate $strXML .= ""; $strXML .= " $strXML .= ""; $strXML .= ""; $strXML .= ""; $strXML .= "" $strXML .= " $strXML .= ""; $strXML .= ""; $strXML .= ""; //free the resultset odbc_free_result($result2); odbc_free_result($result3); odbc_free_result($result4); } } odbc_close($link); //Finally, close element $strXML .= " "; //Create the chart echo renderChart("../FusionCharts/MSCombiDY2D", "", $strXML, "Product Sale", 600, 300, false, false); ?>
  5. OK thank you very much for your help...i think my problem is solved... thanks!
  6. sorry i didn't reply soon...it was the weekend...hehe okay i still can't do that...and I don't know why. can i just use renderChartHTML? what's the pro and cons? next thing i want to know, can yo tell me how to make all 3 entity into line graphs? means that there will be 3 lines in the graph...thanks for helping!
  7. Rahul, My mind is boggling...can't find anything wrong with the path. Let me explain: My main project folder in www root is named 'Nashgraph'. Inside it I have 2 more folders called 'Codings' and 'FusionCharts'. I store the 'FusionCharts.js' file, swf files and 'includes' under the 'FusionCharts' folder. All my written codes are in 'Codings' folder. So, i think my path in the code is right already, no? i.e: "../FusionCharts/FusionCharts.js"
  8. thanks so much Rahul for helping me! can you tell me what's the difference between renderChart and renderChartHTML? i will go and check the FusionCharts.js path... if it's not a problem, can you please explain to me what i did wrong in the while loop? the file that you've modified works fine and it makes me very excited and curious thanks a million!!
  9. Yay! I changed to RenderChartHTML and it works! well, my graph is shown...but it is not what i expected...must be something wrong with my code... I attached the screenshot of the graph below...the 'intended' look of the graph is in attachment too... nasha.jpg --> currently graph.jpg --> suppossed to look like this
  10. Hi.. I've checked the path and it is correct! maybe it's my Fusionchart coding that is wrong? coz in the documentation, it only shows the php example of a pie chart, and no examples of complicated charts such as this multiple 2 y axis graph...can somebody check what's wrong? Rahul, thanks for helping me edit: attached is my latest code php_file.txt
  11. thanks for your reply, Rahul..I've tried your solution but there is still no charts displayed.. it only says "Chart." what's the prob? :ermm:
  12. ***update: I no longer have the errors...I've fixed the previous code a lil bit...but now my chart does not appear. it just says "Chart." What's wrong? Please someone help me...thanks! I attached the new code below.. php_file.txt