dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: select statement

  1. #1
    Join Date
    Jan 2003
    Location
    PA
    Posts
    1,898

    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!

  2. #2
    Join Date
    Jan 2003
    Location
    PA
    Posts
    1,898
    nevermind, I figured it out (Select Distinct)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles