Well I haven't been able to get anything working properly in sugar and my knowledge of php is minimal.
So don't laugh too hard.
Here's the php required to display the zipcode and sales person in a table.
Code:
<?php
mysql_connect("localhost", "root", "test") or die(mysql_error());
mysql_select_db("sales") or die(mysql_error());
$zipcode=92605; //put sugarcrm's variable for the zipcode here
$result = mysql_query("SELECT * FROM salespersons where zip=$zipcode")
or die(mysql_error());
echo "<table border='1'>";
echo "<tr> <th>Zip</th> <th>Name</th> </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
echo "<tr><td>";
echo $row['zip'];
echo "</td><td>";
echo $row['sls_name'];
echo "</td></tr>";
}
echo "</table>";
mysql_close($con);
?> What I attempted was sticking that into an html custom field. Apparently the html field only displays html though. 
If you could explain more about the logic hook you were talking about, I'd be very grateful.
@Andy
What do you mean by the studio's s/b? Am I missing something obvious?
Bookmarks