Hi Piranha and many thanks for your reply.
I have played around with this for hours.
What I actualy have is a variable $company which I want to use for my filter on the SELECT query.
mysql_select_db($database_bag, $bag);
$query = "SELECT f_company_name, month(f_date), COUNT(f_baggage) as ct FROM bag GROUP BY MONTH (f_date) ";
$found = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_assoc($found)) {
$f_month[] = $row['month(f_date)'];
$f_count[] = $row['ct'];
}
The results of this query are used in a jpGraph which works fine until I place a WHERE statement in the query.
Can you please advise me.