";
// This is the form that allows you to amend and test URLs.
echo "";
// This is the table header - titles are set to be parameter names for easy reference
echo "" ;
echo "framework | lot | supplier | customer | date_from date_to | ";
echo "product | spend_from spend_to |
";
// This while loop is the business end of this test program. It reads and processes the contents of the query results.
while (($buffer = fgets($handle)) !== false) // read until end of file
{
$count += 1; // Increment counter by 1
$fields = explode("," ,$buffer); // expand the result set into an array - works for csv format only
$framework = $fields[0]; // The next six lines show how to extract fields from the import line - csv format only
$lot = $fields[1];
$supplier = $fields[2];
$customer = $fields[3];
$date = $fields[4];
$product = $fields[5];
$spend = $product[6];
$numfields = count($fields) ; // The number of fields returned
echo $buffer."
"; // This will output the row unchanged except for a new line for each row.
}
echo "