I am having the same problem as many others, I edited the code to this:
$total_nr = 0;
if (isset($current_user->ID))
{
$total_nr = (int) $wpdb->get_var( $wpdb->prepare( “SELECT count(img_id) as total_nr from “.$wpdb->prefix.”photocontest WHERE wp_uid = %d and visibile=1 and contest_id = %d”, $current_user->ID, $photo_contest_id) );
}
but it still won’t let anyone upload a photo. I am very new to wordpress, but have been doing websites for a long time. Help?