I am having some trouble with PHP/MySQL and need some help if possible. I am creating tables, one as large as 13 mb, but am under the impression that this is what PHP is used for - to pull large amounts of data. Nonetheless, I continually get timeouts and errors when accessing my database via the panel and phpmyadmin. Certain databases won’t even fully load, and I am constantly having to load from a backup. These problems did not start until last week when DH did some things to the panel.
Anywho, here is my code they said was problematic. I’m definitely no PHP expert so can someone help me out?
SELECT P.player_id, P.last_name, P.first_name, T.team_id, T.abbr, P.organization_id, POS.pos_id, POS.pos, P.position, RS.mlb_service_days, RS.player_id, P.league_id, PS.vorp, PS.split_id, PS.player_id, PS.league_id, BS.vorp, BS.split_id, BS.player_id, BS.league_id FROM players P, teams T, position POS, players_roster_status RS, players_career_pitching_stats PS, players_career_batting_stats BS WHERE P.league_id=100 AND P.player_id=RS.player_id AND P.organization_id=T.team_id AND P.position=POS.pos_id AND RS.mlb_service_days>0 AND RS.mlb_service_days<344 AND ((PS.split_id=1 AND PS.vorp>5 AND PS.player_id=P.player_id AND PS.league_id=100) || (BS.split_id=1 AND BS.vorp>10 AND BS.player_id=P.player_id AND BS.league_id=100)) GROUP BY P.player_id ORDER BY P.last_name DESC LIMIT 18;