Displaying results from a query
Posted: Tue Sep 02, 2003 12:51 am
I am having trouble displaying information from a query... any help would be great...
Thanks in advance....
Here is the hardcoded data:
And here is the dynamic code, need the two lines under "hBar" to display like shown above:
Thanks in advance....
Here is the hardcoded data:
Code: Select all
<?php echo
bar_graph(
"hBar",
"150, 167, 250, 341, 35, 117, 47, 201, 124, 98, 211",
"7-1-2003,7-2-2003,7-3-2003,7-4-2003,7-5-2003,7-6-2003,7-7-2003,7-8-2003,7-9-2003,7-10-2003,7-11-2003",
1,
"Valid W/D"
)
?>Code: Select all
<?php
@mysql_connect($host, $loginname, $password) or die(mysql_error());
@mysql_select_db($data) or die('Could not select database'.mysql_error());
$result = mysql_query("SELECT SUM(num_TransactionAmount) as trans, dte_Settlement, num_TransactionAmount
FROM tbl_ATME_Data
WHERE dte_Settlement BETWEEN '2002-01-01' AND '2002-01-07' AND num_TerminalID = '$txt_TerminalID' GROUP by dte_Settlement LIMIT 31");
while ($r = mysql_fetch_array($result)) {
echo
bar_graph(
"hBar",
"".$rї'trans'].",",
"".$rї'dte_Settlement'].",",
1,
""
);
}
?>