Hi all,
The following code should link 2 tables, showing: student id, surname, firstname, study type, start year.
However, its not :-). its just a white screen. ive got php5.ini with ERROR_REPORTING (E_ALL); in it but im still getting nothing at all.
The tables definitly exist!
have i missed something stupid?
<?php
require_once("myfunctions.php");
$db = getConnection();
$stmt = $db->query( "SELECT student.studentCode, student.Surname, student.Forename, studyType.typeDesc ".
" FROM student, studyType ");
while ( $obj = $stmt->fetchObject()){
echo $obj->student.studentCode . ": " . $obj->student.Surname . ": " . $obj->student.Firstname . ": " . $obj->studyType.typeDesc . $obj->studyType.startYear "<br />\n";
}
}catch( PDOException $e ) { echo $e->getMessage();}
?>