This commit is contained in:
Dan Olson 2000-06-13 02:59:45 +00:00
parent 8059305105
commit 989519cac2

View file

@ -30,13 +30,14 @@ function searchNews ($string)
need ('date sql');
echo '<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0"> <TR vAlign="top"> <TD colSpan="2">';
tableBoxHeader( 'black', tableHeadColor );
tableTitle( $pageName, 1, tableHeadColor );
tableTitle( "Search Results", 1, tableHeadColor );
$search = "\'%$string\%'";
$conn = @mysql_pconnect (sqlHost, sqlUser, sqlPass);
if ($conn) {
$query = 'SELECT n_date, n_user, n_news FROM news_main WHERE '.
'n_news LIKE ' . $search . ' ORDER BY n_date DESC';
echo $query;
$result = @mysql_db_query (sqlDB, $query, $conn);
if ($result) {
$numRows = @mysql_num_rows ($result);
@ -55,7 +56,7 @@ echo '<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0"> <TR vAlign
} else {
echo '<P>SQL error, please contact the webmaster.';
}
tableBoxFooter();
tableBoxFooter();
echo '</TD></TR></TABLE>';
}
?>