Am doing a query - PHP to MYSQL - and the results will always be a single record. Never more than one.
Right now, am loading everything into an array, and am massaging the text by using if statements in the results to put someones certification status behind their name, amongst other things.
IF they have one, place a comma, space, and certification(s) (CNA, MCSE, MCSA, etc) behind it. Certifications is one field, they put them all on a single line.
Is there a cleaner way than this? Is this far too clunky? Or did I get lucky for a change?
$query = "SELECT * FROM $tablename where MemID='$MemIDNum'";
$result = mysql_db_query($dbname, $query, $link);
while ($row = mysql_fetch_array ($result)) {
print ("<b>");
print ("$row[FirstName]");
print(" ");
print ("$row[MiddleName]");
print(" ");
print ("$row[LastName]");
// start prof designation
$ProfDesigStringLength = strlen($row[ProfDesig]);
if ($ProfDesigStringLength < 1) {
print("<p>");
}
Else {
print(", " . "$row[ProfDesig]");
};
print ("</b>");
//end prof designation