deiffert

Members
  • Content count

    4
  • Joined

  • Last visited

About deiffert

  • Rank
    Forum Newbie
  1. Query MYSQL, return chart - HELP

    Hi, Thanks for the response. I contact FusionCharts directly and they helped me get it all worked out. It's working great now! Thanks, - David
  2. Query MYSQL, return chart - HELP

    UPDATE: I have the php file reading from the mysql database just fine, i'm just not sure how to format the xml string to work. //Request the factory Id from Querystring $ProductId = $_GET['ProductId']; //Generate the chart element string $strXML = ""; // Connect to the DB $link = connectToDB(); //Now, we get the data for that factory $strQuery = "select * from Product_Master where ProductId=" . $ProductId; $result = mysql_query($strQuery) or die(mysql_error()); //Iterate through each factory if ($result) { while($ors = mysql_fetch_array($result)) { //Here, we convert date into a more readable form for set label. $strXML .= "**less than symbol here**set label='" . $ors['Company'] . "' value='" . $ors2['Date'] . "' value='" . $ors2['Price'] . "' /**greater than symbol here**"; } } mysql_close($link); //Close element $strXML .= ""; //Create the chart - Column 2D Chart with data from strXML echo renderChart("../../FusionCharts/Column2D.swf", "", $strXML, "FactoryDetailed", 600, 300, false, false); ?> I had to replace this: < with: **less than symbol here** because it wasn't showing up right for some reason. in my real code, it's correct. I'm fairly certain that the problem is that my strXML string isn't being generated properly. I've just been using some trial and error here, so the string is probably totally jacked up at this point. Please let me know what you think. Thanks, - David
  3. Query MYSQL, return chart - HELP

    OR, if it would be better to have all the data in xml somehow and just grab it from there, i wouldn't be opposed to that.
  4. I'm looking to query a database with a product number, and return the data form that product in a graph. Here's the deal: I work for an electronics retailer. Every week we go out an collect the prices of our competitors to ensure that we are the lowest price (a few hundred different products). We want to create a database with this data and our own prices and have a site where our sales guys can enter a product # in and it will return a line graph with our price and the prices from our competitors over the last however many months. I've seen and gone through the PHP/Database examples, but can't find any references on how to query a database with an input field and return a graph with that data. Any thoughts? Thanks.