MySQL Forums
Forum List  »  PHP

Re: simple question...
Posted by: Larry Brown
Date: September 15, 2005 02:30PM

Not sure if all my braces are correct here. Hard to read without the formatting. You should get the idea though.


$domain_query.= $wclause_sql . " AND datab.name='UNIPROT' ";
$domain_result = mysql_query($domain_query) or die(mysql_error());


//print results in HTML
echo "<table width='75%' border=2 cellpading=1>";
echo "<tr>";
echo "<td align = \"center\"colspan=\"2\">Pattern search results</td>";
echo "</tr>";

if(@mysql_num_rows($domain_result) == 0) {

echo '<tr><td>Sorry, No records Found</td></tr>

} else {
while ( $line = mysql_fetch_array($domain_result, MYSQL_ASSOC) ) {

echo "<tr>";

foreach ($line as $col_value) {

echo "<td width = \"50%\">$col_value</td>"
."<td width = \"50%\"><a href ='retrieve_entry.php?code=".$col_value."'>view entry</td>";

}

echo "</tr>";

}

}

}

echo '</table> // close the table.

Options: ReplyQuote


Subject
Written By
Posted
September 15, 2005 11:20AM
Re: simple question...
September 15, 2005 02:30PM
September 15, 2005 02:51PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.