/    Sign up×
Community /Pin to ProfileBookmark

select statement

I have a php page that is selecting just 1 column from an Oracle table. When I display this info, how do I display only 1 item if the selected info is the same? For example, I have a release_nbr column for each entry (row). This column may have the same info for multiple rows. How do I only display the info 1 time if it has multiple rows? Right now, it is displaying the info multiple times as shown below:

Release: 3.0.2
Release: 3.0.2
Release: 3.0.2
Release: 3.0.2
Release: 3.0.2
Release: 3.0.2
Release: 3.0.2

my code for my loop looks like this:

for ($i=0; $i< $D->numrows; $i++) {
$release_nbr = $D->results[“RELEASE_NBR”][$i];
?>

<tr>
<td width=”10%” valign=”top”>Release:</td>
<td valign=”top”><a href=”search_results.php”><? echo $release_nbr ?></a></td>
</tr>

Thanks!

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@jrthor2authorJun 03.2003 — nevermind, I figured it out (Select Distinct)
×

Success!

Help @jrthor2 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.14,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...