Housing and Education Research

Search for research on the intersection of housing and education policy. Read jargon-less summaries of key findings and interesting facts, or read the full PDF and grab the citation for your own writing.

"Descriptive Only", "review" => "Literature Review", "non" => "Non Experimental", "quasi" => "Quasi-Experimental", "random" => "Random Assignment" ); $host = "housinged.db.10785476.hostedresource.com"; $user = "housinged"; $password = "O6pmlv!!O6pmlv"; $db = "housinged"; $cxn = mysqli_connect($host,$user,$password,$db); if (!$cxn){ echo "Database error: ".mysqli_connect_error(); die(); } $query = "SELECT count(studyID) FROM studies"; $result = mysqli_query($cxn,$query); if (!$result){ echo "Error getting studyID count: ".mysqli_error($cxn); die(); } $row = mysqli_fetch_row($result); $numStudies = $row[0]; for ($i=1;$i<=$numStudies;$i++){ # Studies data $query = "SELECT * FROM studies WHERE studyID = ".$i; $result = mysqli_query($cxn,$query); if (!$result){ echo "Error getting study information: ".mysqli_error($cxn); die(); } $row = mysqli_fetch_row($result); if ($row[4] == 'pdf'){ $text = 'Full Article (PDF)'; } else{ $text = 'Abstract'; } # Authors data - Number of authors $query = "SELECT count(authorNum) FROM authors WHERE studyID = ".$i; $author_result = mysqli_query($cxn,$query); if (!$author_result){ echo "Error getting authors: ".mysqli_error($cxn); die(); } $num_row = mysqli_fetch_row($author_result); $numAuthors = $num_row[0]; # Findings data - Number of findings $query = "SELECT * FROM findings WHERE studyID = ".$i; $finding_result = mysqli_query($cxn,$query); if (!$author_result){ echo "Error getting findings: ".mysqli_error($cxn); die(); } # Facts data - Number of facts $query = "SELECT * FROM facts WHERE studyID = ".$i; $fact_result = mysqli_query($cxn,$query); if (!$fact_result){ echo "Error getting facts: ".mysqli_error($cxn); die(); } echo '
'; echo '
'; echo '

'.$row[1].'

'; echo '
'; echo ''.$row[2].''; echo ''.$keys[$row[3]].''; echo ''.$text.''; echo '
'; echo '
By '; for ($j=1;$j<=$numAuthors;$j++){ $query = "SELECT * FROM authors WHERE studyID = ".$i." AND authorNum = ".$j; $authors_result = mysqli_query($cxn,$query); if (!$author_result){ echo "Error getting individual authors: ".mysqli_error($cxn); die(); } $authorRow = mysqli_fetch_row($authors_result); if (!$authorRow[3]){ $insert = ' '; } else { $insert = ' '.$authorRow[3].'. '; } if ($j == 1){ echo ''.$authorRow[2].$insert.$authorRow[4].''; if ($numAuthors > 2){ echo ''; } else if ($numAuthors == 2){ echo ' and '; } } else{ echo ''.$authorRow[2].$insert.$authorRow[4].''; if ($numAuthors > ($j + 1)){ echo ''; } else if ($numAuthors == ($j + 1)){ echo ', and '; } } } echo '
'; echo '

'.$row[6].'

'; echo '

Key Findings

'; echo ''; echo '

Interesting Facts

'; echo ''; echo '

Citation

'; echo '
'; echo '

'.$row[7].'

'; echo '
'; echo '
'; } ?>