try something like this
<?php
include('db_inc.php'); // defines HOST etc
$db = new mysqli(HOST, USERNAME, PASSWORD, DATABASE);
$sql = "SELECT firstname
, lastname
, local
FROM member
ORDER BY firstname, lastname";
$local = '';
$nonlocal = '';
$res = $db->query($sql);
while (list($fn, $ln, $loc) = $res->fetch_row()) {
if ($loc=='Y') {
$local .= "$fn $ln<br>";
}
else {
$nonlocal .= "$fn $ln<br>";
}
}
?>
<html>
<head>
</head>
<body>
<table border='1'>
<tr><th>Local</th><th>Non-Local</th></tr>
<tr style='vertical-align: top;'>
<td><?=$local?></td>
<td><?=$nonlocal?></td>
</tr>
</table>
</body>
</html>