diff options
author | jchu <jchu> | 2004-12-15 02:46:04 +0000 |
---|---|---|
committer | jchu <jchu> | 2004-12-15 02:46:04 +0000 |
commit | c8a97026203995f2c9123a01142074a8ffc2eeba (patch) | |
tree | fb843dd151e48f776b1034c110934ad3fb8f28a4 /web/lib/pkgfuncs.inc | |
parent | bcf1c50b77cde57a695ace977beab705ab4f1ed4 (diff) | |
download | aurweb-c8a97026203995f2c9123a01142074a8ffc2eeba.tar.xz |
everything except package contents done
Diffstat (limited to 'web/lib/pkgfuncs.inc')
-rw-r--r-- | web/lib/pkgfuncs.inc | 6 |
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; |