Code: Select all
<?php $query1 = "SELECT carrier.Name, report.Act_Year
FROM carrier, report
WHERE carrier.NAIC = report.NAIC AND report.Sel_Year = 2004 AND report.Sel_Quarter = 1
ORDER BY report.Act_Year";
$result1 = mysql_query($query1) or die ("Query failed: ". mysql_error());
$carriers = mysql_fetch_array($result1);
var_dump($carriers);
?>array(4) { [0]=> string(28) " Stratford Insurance Company" ["Name"]=> string(28) " Stratford Insurance Company" [1]=> string(14) "20040406161410" ["Act_Year"]=> string(14) "20040406161410" }
Firstly, I know there are only three items in the DBase which will return when I run the same query from phpMyAdmin