Changeset 54446


Ignore:
Timestamp:
Jul 27, 2009, 7:26:27 PM (9 years ago)
Author:
wsiegrist@…
Message:

Do not die when encountering a mysql error, just treat it as count=0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/includes/common.inc

    r48795 r54446  
    118118    global $portsdb_name;
    119119
    120     $result = mysql_query("SELECT COUNT(DISTINCT name) FROM $portsdb_name.portfiles") or die("Error: " . mysql_error());
     120    $result = mysql_query("SELECT COUNT(DISTINCT name) FROM $portsdb_name.portfiles");
    121121    if ($result) {
    122122        $row = mysql_fetch_array($result);
     
    135135    global $portsdb_name;
    136136
    137     $result = mysql_query("SELECT COUNT(DISTINCT category) FROM $portsdb_name.categories") or die ("Error: " . mysql_error());
     137    $result = mysql_query("SELECT COUNT(DISTINCT category) FROM $portsdb_name.categories");
    138138    if ($result) {
    139139        $row = mysql_fetch_array($result);
Note: See TracChangeset for help on using the changeset viewer.