Need Help on SQL

findet ihr hier.
User avatar
Trubadix
.
Posts: 339
Joined: Fri Oct 24, 2008 4:35 pm
Joomleague version: 2.0.x
Location: 31542
Contact:

Need Help on SQL

Postby Trubadix » Mon Apr 11, 2011 3:16 pm

I try to produce a output with MySQL(MySQL Workbench)

Code: Select all

select  AVG(event_sum) AS schnitt,
        SUM(event_sum) AS total,
        event_type_id, match_id, me.project_id, player_id, me.team_id, p.lastname,
        p.firstname, t.middle_name, dv.shortname AS liga
FROM db601052.k23000_joomleague_match_events AS me
INNER JOIN k23000_joomleague_team_player AS tp ON tp.person_id = me.player_id
INNER JOIN k23000_joomleague_persons AS p ON p.id = me.player_id
INNER JOIN k23000_joomleague_project_team AS pt ON pt.project_id = me.project_id
INNER JOIN k23000_joomleague_teams AS t ON t.id = me.team_id
INNER JOIN k23000_joomleague_divisions AS dv ON dv.project_id = me.project_id AND dv.id = '23001'
WHERE   me.event_type_id = '9'    AND
        me.project_id = '22'      AND
        dv.id = '23001'
GROUP BY t.id
ORDER BY total DESC;


all tables has got the requested data but result is 0 records are selecteted, tested statement by statement but all together get a zero result, so it must be a bug in my coding!? But where?
I need help, where I'm producing bullshit, please :help:
Life-System : Joomla 2.5.28 auf Domainfactory, Joomleague 2.0.x
http://www.shootingleague.shg24.com/
Test-System: Joomla 3.6.x auf Strato, Joomleague 3.0.x
http://ligatest.ksv-nesselblatt.de/

Return to “Tipps, Tricks, Änderungen am Quelltext: JL 0.xx”

Who is online

Users browsing this forum: No registered users and 1 guest

cron