www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Server-Side Development > PHP

    PHP Discussion and technical support for using and deploying PHP based websites.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 11-21-2009, 04:31 PM
    Yokiest Yokiest is offline
    Registered User
     
    Join Date: Aug 2009
    Posts: 20
    Exclamation Duplication Help!!

    Hello again with out this site i'd be lost.

    Okay the question I have is this i have two tables that i join on an id
    and then out put all the information.

    table 1
    id
    name
    status

    table 2
    id
    state
    service

    now the way this works is that i have vendors on my site that i want to display what happens is it combines the table then in place out the information based on the status of the vendor where there active or not
    the problem i have is some vendors are in more than one state or do more than just one service so what happens is there displayed 2 two 3 times
    i was wondering if there was a way i could make it show only once.
    Reply With Quote
      #2  
    Old 11-21-2009, 06:58 PM
    criterion9 criterion9 is offline
    B.S. CIS
     
    Join Date: Jan 2009
    Posts: 1,353
    Have you tried using GROUP BY in your SQL statement?
    Reply With Quote
      #3  
    Old 11-21-2009, 11:21 PM
    Yokiest Yokiest is offline
    Registered User
     
    Join Date: Aug 2009
    Posts: 20
    yes i have and its grouped by state
    but what i'm getting is

    id = 3
    name = Vendor
    status = A
    state = LV
    service = cs

    id = 3
    name = Vendor
    status = A
    state = LV
    service = rc

    and its because the vendor does 2 things and not one and i'm trying to show all vendors in a state once and not 3 or 4 times
    Reply With Quote
      #4  
    Old 11-22-2009, 12:35 AM
    ssystems ssystems is offline
    Registered User
     
    Join Date: Oct 2009
    Posts: 278
    Group it by vendor id
    __________________
    Good Luck

    Santos Systems
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 12:57 PM.



    Acceptable Use Policy


    The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.