Good transition 😃
I've converted a few Colfusioners to PHP too. They all like it much better. Here's the example of a full page with the table. I've become quite a stickler with the layout of my html, so I keep it as neat as possible.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Blah</title>
</head>
<body>
<?php
$connect = mysql_connect("","","");
mysql_select_db("blah",$connect);
$sql = "SELECT *
FROM modems
WHERE instdate = curdate()
ORDER BY jobnum";
$result = mysql_query($sql);
if(mysql_num_rows($result) > 0) {
?>
<table border="1">
<tr>
<td>Job Number</td>
<td>Customer</td>
<td>Address</td>
</tr>
<?php
while($myrow = mysql_fetch_array($result)) {
?>
<tr>
<td><a href="page.php?jobnum=<?php echo $myrow['jobnum'] ?>"><?php echo $myrow['jobnum']?></a></td>
<td><?php echo $myrow['custname']?></td>
<td><?php echo $myrow['custadd']?></td>
</tr>
<?php
}
?>
</table>
<?php
}
else {
?>
<p>Sorry, no records were found!</p>
<?php
}
mysql_free_result($result);
mysql_close($connect);
?>
</body>
</html>
Since it's procedural, it'll only show what fits. So if there's rows, it's show the table with all o the results, otherwise, it will just show the no records found message.
HTH