kevincro Posted March 27, 2008 Share Posted March 27, 2008 My first question is, has anyone used a PHP/SWF charts before, and if so have you had any problems with it. My second question is, is there anything wrong with the following code. I'm trying to set up an array that will populate a flash chart with database info. $data_key = $_GET['item_id']; include "charts.php"; //start the PHP multi-dimensional array and create the region titles $chart [ 'chart_data' ][ 0 ][ 0 ] = ""; $chart [ 'chart_data' ][ 1 ][ 0 ] = "Number $data_key "; require "db_connect.php"; //get the smallest year to determine which year to start the chart with $result = mysql_query("SELECT MIN(game) AS MinGame FROM bankroll WHERE number = '$data_key'"); $MinGame = mysql_result ( $result, 0, "MinGame" ); //get all the data in the Growth table $result = mysql_query ("SELECT * FROM bankroll WHERE number = '$data_key'"); //extract the data from the query result one row at a time for ( $i=0; $i < mysql_num_rows($result); $i++ ) { //determine which row in the PHP array the current data belongs to switch ( mysql_result ( $result, $i, "number" ) ) { case " Number $data_Key ": $row = 1; break; } //determine which column in the PHP array the current data belongs to $col = mysql_result ( $result, $i, "game") - $MinGame + 1; //populate the PHP array with the game title $chart [ 'chart_data' ][ 0 ][ $col ] = mysql_result ( $result, $i, "game"); //populate the PHP array with the bank data $chart [ 'chart_data' ][ $row ][ $col ] = mysql_result ( $result, $i, "Bank"); } Quote Link to comment Share on other sites More sharing options...
discomatt Posted March 27, 2008 Share Posted March 27, 2008 You're talking about a 3rd party class or library I'm assuming? Your best bet for help would be the developer's website/forum. Quote Link to comment Share on other sites More sharing options...
kevincro Posted March 27, 2008 Author Share Posted March 27, 2008 I've looked all over their support site to no avail. Quote Link to comment Share on other sites More sharing options...
discomatt Posted March 27, 2008 Share Posted March 27, 2008 Well, I hope someone has extensive knowledge of the class then, or at least enough to figure out what you're doing wrong. Consider this a free bump Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.