--- cre.module.original 2008-11-12 18:54:54.000000000 -0500 +++ cre.module 2008-11-12 19:59:50.000000000 -0500 @@ -43,11 +43,19 @@ function cre_settings() { ); $start = variable_get('cre_starting_position', 0); - $max = db_result(db_query("SELECT MAX(vote_id) FROM votingapi_vote")); - $form['cre_index_status'] = array( - '#type' => 'markup', - '#value' => '' . $start / $max . ' of the site indexed', - ); + $max = db_result(db_query("SELECT MAX(vote_id) FROM {votingapi_vote}")); + if ($max){ + $form['cre_index_status'] = array( + '#type' => 'markup', + '#value' => '' . $start / $max . ' of the site indexed', + ); + } + else{ + $form['cre_index_status'] = array( + '#type' => 'markup', + '#value' => 'Still nothing to index', + ); + } $form['cre_query_type'] = array( '#type' => 'radios',