mirror of
https://git.code.sf.net/p/quake/website
synced 2025-02-17 17:31:39 +00:00
Hide connection errors.
This commit is contained in:
parent
a9ff947b48
commit
cb7bbf5b6a
2 changed files with 6 additions and 6 deletions
|
@ -1,14 +1,14 @@
|
|||
<?
|
||||
need('date sql');
|
||||
|
||||
$conn = mysql_pconnect (sqlHost, sqlUser, sqlPass);
|
||||
$conn = @mysql_pconnect (sqlHost, sqlUser, sqlPass);
|
||||
if ($conn) {
|
||||
$query = 'SELECT n_date, n_user, n_news FROM news_main' .
|
||||
' WHERE n_date > DATE_SUB(NOW(), INTERVAL 1 MONTH)' .
|
||||
' ORDER BY n_date DESC';
|
||||
$result = mysql_db_query (sqlDB, $query, $conn);
|
||||
$result = @mysql_db_query (sqlDB, $query, $conn);
|
||||
if ($result) {
|
||||
$numRows = mysql_num_rows ($result);
|
||||
$numRows = @mysql_num_rows ($result);
|
||||
if ($numRows) {
|
||||
for ($i = 0 ; $i < $numRows ; $i++) {
|
||||
list ($n_date, $n_user, $n_news) = mysql_fetch_row ($result);
|
||||
|
|
|
@ -12,15 +12,15 @@ echo '<TABLE width="100%" cellSpacing="0" cellPadding="0" border="0"> <TR vAlign
|
|||
tableTitle( $pageName, 1, tableHeadColor );
|
||||
|
||||
$mydate = $yr . '-' . $mon;
|
||||
$conn = mysql_pconnect (sqlHost, sqlUser, sqlPass);
|
||||
$conn = @mysql_pconnect (sqlHost, sqlUser, sqlPass);
|
||||
if ($conn) {
|
||||
$query = 'SELECT n_date, n_user, n_news FROM news_main WHERE '.
|
||||
'n_date BETWEEN \'' . $mydate . '-00 00:00:00\' AND '.
|
||||
'\'' . $mydate . '-31 23:59:59\'' .
|
||||
' ORDER BY n_date DESC';
|
||||
$result = mysql_db_query (sqlDB, $query, $conn);
|
||||
$result = @mysql_db_query (sqlDB, $query, $conn);
|
||||
if ($result) {
|
||||
$numRows = mysql_num_rows ($result);
|
||||
$numRows = @mysql_num_rows ($result);
|
||||
if ($numRows) {
|
||||
for ($i = 0 ; $i < $numRows ; $i++) {
|
||||
list ($n_date, $n_user, $n_news) = mysql_fetch_row ($result);
|
||||
|
|
Loading…
Reference in a new issue