SitePoint Sponsor

User Tag List

Page 3 of 3 FirstFirst 123
Results 51 to 60 of 60
  1. #51
    SitePoint Guru
    Join Date
    Nov 2003
    Location
    Huntsville AL
    Posts
    689
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    LEFT JOIN teams AS home_team ON fixtures.home_id = teams.team_id
    LEFT JOIN teams AS home_team ON fixtures.home_id = home_team.team_id

    Plus I'm assuming that you do in fact have a team_id column and not just one called id?

  2. #52
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Hold the bus! How can you call y'self geordiewire when your rugby clubs are Lancashire based?

    Are you some kinda wars'o'the'roses orphan or what?

    Cups are you uk based?
    Sort of, yeah, mentally.
    At least I don't live on top the Penines in a pit stop on the M62.

  3. #53
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ahundiak View Post
    LEFT JOIN teams AS home_team ON fixtures.home_id = teams.team_id
    LEFT JOIN teams AS home_team ON fixtures.home_id = home_team.team_id

    Plus I'm assuming that you do in fact have a team_id column and not just one called id?
    I will look at this in the morning or should I say later this morning, my brain is now hurting

    Thanks for your help

  4. #54
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Cups View Post
    Hold the bus! How can you call y'self geordiewire when your rugby clubs are Lancashire based?

    Are you some kinda wars'o'the'roses orphan or what?


    Sort of, yeah, mentally.
    At least I don't live on top the Penines in a pit stop on the M62.

    Lol,

    I am originally from the North East but moved over to Sunny Warrington around 11 years ago.

    I wouldnt be building this site if still in the NE, they dont know what Rugby League is

    You a league fan?

  5. #55
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Guys,

    I finally after a little bit of tweaking have a working Query which gives me the results that I required as follows

    SELECT fixtures.fixture_date AS fixture_date, competitions.id AS fixtype_id, competitions.competition AS competition_name, home_team.team_id AS home_team_id, home_team.team AS home_team_name, away_team.team_id AS away_team_id, away_team.team AS away_team_name, fixtures.kick_off, referee.id AS referee_id, referee.name AS referee_name
    FROM fixtures
    LEFT JOIN competitions ON fixtures.fixtype_id = competitions.id
    LEFT JOIN teams AS home_team ON fixtures.home_id = home_team.team_id LEFT JOIN teams AS away_team ON fixtures.away_id = away_team.team_id LEFT JOIN referee ON fixtures.referee_id = referee.id
    WHERE fixtures.fixtype_id =1
    AND fixtures.age_group_id =15
    AND fixtures.finalised =0

    It means that I can get the fixtures page working as required and then I need to look at the previous results section.

    Thanks for your help so far, I will be back shortly when doing the results.

  6. #56
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another question, hopefully this one will be simpler than many of my previous.

    I have email addresses stored in the database that when displayed I would like to be turned into an email link.

    How would I do this?

  7. #57
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Is this what you're after?:
    PHP Code:
    <?php
    $query 
    mysql_query("SELECT email, name FROM table");
    while(
    $row mysql_fetch_array($query)){
         
    printf('<a href="mailto:%s">%s</a>'$row['email'], $row['name']);
    }
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  8. #58
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Excuse my ignorance but where will I put that code?

    I am using dreamweaver to build the site which I beleive isnt really the done thing with PHP according to Hard Core Coders!!

  9. #59
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another question if I may, can anyone now point me in the direction of search tutorials which will allow me to search the fixtures table depending on a date range, an age group or a particular team.

    Also how would I write a WHERE clause to show results within the last 7 days?

    Many Thanks

    Paul

  10. #60
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Help Please?


Bookmarks

Posting Permissions

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