Index: cre.module =================================================================== --- cre.module (revision 5) +++ cre.module (working copy) @@ -384,7 +384,7 @@ $vote_limit = variable_get('cre_max_install_votes', 5); // for every vote within range...^ - $db_result = db_query("SELECT vote_id, uid, content_id, content_type FROM votingapi_vote + $db_result = db_query("SELECT vote_id, uid, content_id, content_type FROM {votingapi_vote} WHERE vote_id < %d ORDER BY vote_id DESC LIMIT %d", $starting_pos, $vote_limit); while ($vote_obj = db_fetch_object($db_result)) { @@ -412,17 +412,17 @@ $uid = $user_obj->uid; // get all vote values made by user - $db_total = db_query("SELECT sum(value) as 'total' from votingapi_vote + $db_total = db_query("SELECT sum(value) as 'total' from {votingapi_vote} WHERE uid = %d AND value_type = 'percent'",$uid); // as long as they are percent... $total_obj = db_fetch_object($db_total); $total = $total_obj->total; // count = num_rows - $db_count = db_query("SELECT vote_id from votingapi_vote where uid = %d",$uid); + $db_count = db_query("SELECT vote_id from {votingapi_vote} where uid = %d",$uid); $num_rows = db_num_rows($db_count); // store to cre_average_vote - db_query("INSERT INTO cre_average_vote (uid, sum, count) + db_query("INSERT INTO {cre_average_vote} (uid, sum, count) VALUES (%d,%d,%d)", $uid, $total, $num_rows); } }