summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
authorjchu <jchu>2004-12-15 02:46:04 +0000
committerjchu <jchu>2004-12-15 02:46:04 +0000
commitc8a97026203995f2c9123a01142074a8ffc2eeba (patch)
treefb843dd151e48f776b1034c110934ad3fb8f28a4 /web/lib
parentbcf1c50b77cde57a695ace977beab705ab4f1ed4 (diff)
downloadaurweb-c8a97026203995f2c9123a01142074a8ffc2eeba.tar.xz
everything except package contents done
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/pkgfuncs.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 54848ce..b4f04d1 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -127,7 +127,7 @@ function create_dummy($pname="", $sid="") {
$q = "SELECT ID FROM Packages WHERE Name = '";
$q.= mysql_escape_string($pname)."'";
$result = db_query($q, $dbh);
- if (!$result) {
+ if (!mysql_num_rows($result)) {
# Insert the dummy
#
$q = "INSERT INTO Packages (Name, Description, URL, SubmittedTS, ";
@@ -138,10 +138,10 @@ function create_dummy($pname="", $sid="") {
if (!$result) {
return NULL;
}
- return mysql_insert_id($result);
+ return mysql_insert_id($dbh);
} else {
$data = mysql_fetch_row($result);
- return $data['ID'];
+ return $data[0];
}
}
return NULL;