Making a mailto link with php code is no different than a regular mailto link. You just need to start the href attribute out with a mailto:, if the column from your db is returning an email address then the link might look like this:
<a href="mailto:<?php echo $row_yourRS['your column'] ?>"><?php echo $row_yourRS['your column'] ?></a>