{source}
Constituencies'; $option = array(); //include 'templates/buildr/includes/Connections/hlm_dbconnection.php'; $driver = 'mysql'; // Database driver name $host = 'localhost'; // Database host name $user = 'little65_spucdb'; // User for database authentication $password = 'p[-1Y6g4SY'; // Password for database authentication $database = 'little65_spucdb'; // Database name $dbprefix='spuc_'; $option]'driver'[ = $driver; $option]'host'[ = $host; $option]'user'[ = $user; $option]'password'[ = $password; $option]'database'[ = $database; $option]'prefix'[ = $dbprefix; $db = JDatabaseDriver::getInstance( $option ); //Report 1 //Initial Report - list constituencies for the chosen letter $ConsInitial= $_GET]'initial'[; $query="SELECT c.`ConstituencyId`, c.`ConstituencyName` as 'Constituency', m.`MPName` as 'MP', MPR.`AbortionProLife`, MPR.`AbortionAbsent`, MPR.`AbortionAntiLife`, MPR.`EuthanasiaProLife`, MPR.`EuthanasiaAbsent`, MPR.`EuthanasiaAgainst` FROM `Constituency` as c INNER JOIN `MP` as m on m.`ConstituencyId` = c.`ConstituencyId` LEFT OUTER JOIN `MPRecord` as MPR on `MPR`.`MPId`= m.`MPId` where left(c.`ConstituencyName`,1) = '$ConsInitial'"; $db->setQuery($query); $db->query(); $recordcount=0; $results = $db->loadObjectList(); echo '
'; ?>
{/source}
]