Index: click_filter/click_filter.install =================================================================== --- click_filter/click_filter.install (revision 363) +++ click_filter/click_filter.install (working copy) @@ -32,7 +32,7 @@ } // Search for clicks by one of the ad's owners. $result = db_query('SELECT oid FROM {ad_owners} WHERE aid = %d AND uid = %d', $ad->aid, $click->uid); - if (db_num_rows($result)) { + if (db_result($result)) { // Mark as clicked by ad owner. db_query('UPDATE {ad_clicks} SET status = %d WHERE cid = %d', CLICK_OWNER, $click->cid); // Decrement click from ad_statistics table. @@ -42,7 +42,7 @@ } // Search for duplicate clicks. $result = db_query("SELECT cid FROM {ad_clicks} WHERE aid = %d AND status = %d AND cid != %d AND (uid = %d OR hostname = '%s')", $ad->aid, CLICK_VALID, $click->cid, $click->uid, $click->hostname); - if (db_num_rows($result)) { + if (db_result($result)) { // Mark as duplicate click. db_query('UPDATE {ad_clicks} SET status = %d WHERE cid = %d', CLICK_DUPLICATE, $click->cid); // Decrement click from ad_statistics table. Index: click_filter/click_filter.module =================================================================== --- click_filter/click_filter.module (revision 363) +++ click_filter/click_filter.module (working copy) @@ -66,7 +66,7 @@ } // See if the click came from an owner of the ad. $result = db_query('SELECT oid FROM {ad_owners} WHERE aid = %d AND uid = %d', $aid, $user->uid); - if (db_num_rows($result)) { + if (db_result($result)) { return CLICK_OWNER; } // See if the click came from a duplicate uid or ip address. @@ -76,7 +76,7 @@ else { $result = db_query("SELECT cid FROM {ad_clicks} WHERE aid = %d AND status = %d AND hostname = '%s'", $aid, CLICK_VALID, ip_address()); } - if (db_num_rows($result)) { + if (db_result($result)) { return CLICK_DUPLICATE; } return CLICK_VALID;