A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: SQL Distinct Question

  1. #1
    Senior Member
    Join Date
    Aug 2000
    Location
    Seoul, South Korea
    Posts
    1,310
    Hi Guys,
    If i have the following code how can i SELECT CatID and not have it affected by the DISTINCT statement?
    Any ideas,
    micmac
    Code:
    $result = mysql_query("SELECT DISTINCT suburb FROM $table WHERE LEFT(suburb,1) = '$alphabet' ORDER BY suburb",$db);

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    still working on that business directory?
    You should perhaps provide a little more info.
    If I recall your project correctly, you had a table that describes businesses via the catId (e.g. 3 is car rentals)
    Do you want to select all those suburbs where a particular kind of business is available with your query? Do you have the suburb added to the main table, or do you have a separate suburbs table that is accessed via an ID

    Musicman

  3. #3
    Senior Member
    Join Date
    Aug 2000
    Location
    Seoul, South Korea
    Posts
    1,310

    Thanks Musicman

    I got it soughted, i ended up doing another query.
    Thanks anyway

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center