if ($item_info_artist_id) { $sql = 'SELECT a.name, v.priority, v.company, v.vendor_id FROM artist_info a INNER JOIN vendor v ON a.vendor_id = v.vendor_id WHERE a.artist_id = ?'; $sql_stmt = $mysqli->prepare($sql); $sql_stmt->bind_param('i', $item_info_artist_id); if (!$sql_stmt->execute()) { showierror($sql); } $art_item_info_result = $sql_stmt->get_result(); $art_item_info_row = $art_item_info_result->fetch_assoc(); $image=$item_info_artist_id . ".gif"; $path = "../../images/artists"; if ( is_file("$path/$image")) { $image=$item_info_artist_id . ".gif"; } else { $image="missing_orchard.jpg"; } ?>