In this case however, I need to calculate and return results from a SQL query, and I'm not sure how to work with the array to get the data I want.
SQL query and fetch;
Code: Select all
<?php
$result = mysql_query("SELECT In_Out, Date, Time, Number, Duration, Line, Station, identifier
FROM $table
WHERE date>='$start_date' AND date<='$end_date' AND time>='$hours1' AND time<='$hours2' AND Line=6
");
$data = mysql_fetch_array($result)
?>
Thanks for any help