SELECT media_id as id,width,height,extension FROM media, $table where (media_id = ${prefix}_id and (%where_clause_expanded here));