[54446] trunk/www/includes/common.inc
wsiegrist at apple.com
wsiegrist at apple.com
Mon Jul 27 12:26:28 PDT 2009
Revision: 54446
http://trac.macports.org/changeset/54446
Author: wsiegrist at apple.com
Date: 2009-07-27 12:26:27 -0700 (Mon, 27 Jul 2009)
Log Message:
-----------
Do not die when encountering a mysql error, just treat it as count=0
Modified Paths:
--------------
trunk/www/includes/common.inc
Modified: trunk/www/includes/common.inc
===================================================================
--- trunk/www/includes/common.inc 2009-07-27 18:53:23 UTC (rev 54445)
+++ trunk/www/includes/common.inc 2009-07-27 19:26:27 UTC (rev 54446)
@@ -117,7 +117,7 @@
function ports_count() {
global $portsdb_name;
- $result = mysql_query("SELECT COUNT(DISTINCT name) FROM $portsdb_name.portfiles") or die("Error: " . mysql_error());
+ $result = mysql_query("SELECT COUNT(DISTINCT name) FROM $portsdb_name.portfiles");
if ($result) {
$row = mysql_fetch_array($result);
$count = $row[0];
@@ -134,7 +134,7 @@
function categories_count() {
global $portsdb_name;
- $result = mysql_query("SELECT COUNT(DISTINCT category) FROM $portsdb_name.categories") or die ("Error: " . mysql_error());
+ $result = mysql_query("SELECT COUNT(DISTINCT category) FROM $portsdb_name.categories");
if ($result) {
$row = mysql_fetch_array($result);
$count = $row[0];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090727/245055fe/attachment-0001.html>
More information about the macports-changes
mailing list