no, I was talkiing about the original code,
<?php global $wpdb;
$query = "SELECT 'ID', 'guid' FROM '$wpdb->posts' WHERE 'post_type' = 'attachment' AND post_parent = '{$post->ID}'";
if ($attachments) {
if (post_parent = '{$post->ID}'){
$adimages = $wpdb->get_results($wpdb->prepare($query), OBJECT);
// To display the first image.. ?>
<img style="float: left; height: 380px;border: 2px solid #464646;" src="<?php if(is_public_submission()){echo $adimages[0]->guid;} ?>" />
<?php }
?>
if you still want to go that route.