Pooja11
-
Posts
2 -
Joined
-
Last visited
Posts posted by Pooja11
-
-
My php script is generating graph, but when i try to pass values from other php script through session or add "require_once(filename.php)" I get broken image and no error. Iam using JpGraph.
My db query php script(db.php)
<?php $link = mysql_connect('localhost', 'root', ''); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db('testcase'); $query = "SELECT COUNT(testRunId) FROM testrundetail GROUP BY platform"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_assoc($result)){ echo $row['COUNT(testRunId)']; echo "\n"; $array[] = $row['COUNT(testRunId)']; } echo "\n"; echo "pooja"; echo $array[7]; ?>
graph generating script -
<?php require_once ('../jpgraph-3.5.0b1/src/jpgraph.php'); require_once ('../jpgraph-3.5.0b1/src/jpgraph_bar.php'); $Device = array('3500', '2530ya'); $ydata = array(19); // Width and height of the graph $width = 500; $height = 500; // Create a graph instance $graph = new Graph($width,$height); // Specify what scale we want to use, // text = txt scale for the X-axis // int = integer scale for the Y-axis $graph->SetScale('textint'); // Setup a title for the graph $graph->title->Set('No. of TC passed against particular device'); // Setup titles and X-axis labels $graph->xaxis->title->Set('(Device)'); $graph->xaxis->SetTickLabels($Device); // Setup Y-axis title $graph->yaxis->title->Set('(No. of TC passed)'); // Create the bar plot $barplot=new BarPlot($ydata); // Add the plot to the graph $graph->Add($barplot); // Display the graph $graph->StrokeCSIM(); ?>
when i do - require_once('db.php') or when I try to pass the values of $array[] = $row['COUNT(testRunId)']; using session i dnt see the graph. I get broken image.
Any help ??
How to specify index in the DB query for the string in a column
in MySQL Help
Posted
In my database I have a column which contain location of a file. The column contains entries like -
I want to query this database and check for the values like networkSecurity, hostAgentFeatures etc at the specified index 2.
I tried using REGEXP and LIKE but it does not always returns the correct output. Also my DB doesn't support FULLTEXT indexes
Is there a way to specify index in MySQL ?
Please guide.