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'); need ('date sql');
echo '<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0"> <TR vAlign="top"> <TD colSpan="2">'; echo '<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0"> <TR vAlign="top"> <TD colSpan="2">';
tableBoxHeader( 'black', tableHeadColor ); tableBoxHeader( 'black', tableHeadColor );
tableTitle( $pageName, 1, tableHeadColor ); tableTitle( "Search Results", 1, tableHeadColor );
$search = "\'%$string\%'"; $search = "\'%$string\%'";
$conn = @mysql_pconnect (sqlHost, sqlUser, sqlPass); $conn = @mysql_pconnect (sqlHost, sqlUser, sqlPass);
if ($conn) { if ($conn) {
$query = 'SELECT n_date, n_user, n_news FROM news_main WHERE '. $query = 'SELECT n_date, n_user, n_news FROM news_main WHERE '.
'n_news LIKE ' . $search . ' ORDER BY n_date DESC'; 'n_news LIKE ' . $search . ' ORDER BY n_date DESC';
echo $query;
$result = @mysql_db_query (sqlDB, $query, $conn); $result = @mysql_db_query (sqlDB, $query, $conn);
if ($result) { if ($result) {
$numRows = @mysql_num_rows ($result); $numRows = @mysql_num_rows ($result);