Thank you so much. It works great.
Could you take a quick look at the following code and give me your thoughts on the efficientness of it:
Thanks again.
//<?php
$db = mysql_connect()
or die ("Could not connect");
mysql_select_db("udllabs")
or die ("Could not select database");
$letter = split("-", $alpha);
$letter[0]; // first letter
$letter[1]; // second letter
$strSearch = strtoupper($letter[0].'-'.$letter[1]).$letter[0].'-'.$letter[1];
$query = mysql_query("SELECT * FROM UDLUD WHERE product_description REGEXP '[$strSearch]' ORDER BY product_description ASC");
echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n";
echo "<tr>\n";
echo "<td style=\"background-color: #000;\"><table cellpadding=\"2\" cellspacing=\"1\" border=\"0\">\n";
echo "<tr>\n";
echo "<th>NDC#</th>\n";
echo "<th>Product Description</th>\n";
echo "<th>Package Size</th>\n";
echo "<th>Compare To</th>\n";
echo "</tr>\n";
{
while($row = mysql_fetch_array($query))
printf("
<tr valign=\"top\">
<td class=\"data\" nowrap>%s</td>
<td class=\"data\">%s</td>
<td class=\"data\">%s</td>
<td class=\"data\">%s</td>
</tr>\n", $row["ndc"], $row["product_description"], $row["size"], $row["compare"]);
}
echo "</table>\n";
//?>