filtering results & mysql - now fixed
Posted: Tue Sep 08, 2009 3:59 am
Hi i am now filtering the results using a form and drop down menus but i cannot get the sql to filter properly
i can either get it to do the team names or dates but i cant get them to work together
ie if the date selector is working i get no team names and if the team names are working i can't filter by date but they work on their own
here is my sql
any ideas?
cheers
Kevin
fixed now
i can either get it to do the team names or dates but i cant get them to work together
ie if the date selector is working i get no team names and if the team names are working i can't filter by date but they work on their own
here is my sql
Code: Select all
SELECT fixtures.division_num, hteam.team_name AS home_team, ateam.team_name AS away_team, fixtures.fixture_date, fixtures.fixture_time, alleys.alley_name FROM fixtures LEFT JOIN alleys ON alleys.alley_id = fixtures.alley_id LEFT JOIN teams AS hteam ON hteam.team_id = fixtures.fixture_home_team_id LEFT JOIN teams AS ateam ON ateam.team_id = fixtures.fixture_away_team_id WHERE fixtures.fixture_date LIKE '2009-09-11' AND ateam.team_name LIKE '%' OR hteam.team_name LIKE '%' ORDER BY fixtures.division_num ASC, fixtures.fixture_date ASC, fixtures.fixture_time ASCcheers
Kevin
fixed now