I am trying to run some MySQL code...
SELECT *,
event_players - event_claimed AS event_unclaimed
FROM EWRtorneo_events
WHERE event_state = 'visible' AND league_id = 1
ORDER BY event_date DESC, event_name DESC
When I run this code, I get the following error:
#2014 - Commands out of sync; you can't run this command now
Now this error ONLY shows up when the search results contains a row where the column for event_players
is equal to 0
. What does this error mean?
If I remove either:
event_players - event_claimed AS event_unclaimed
ORDER BY event_date DESC, event_name DESC
Then the code starts working. However, both those lines are essential for my function.
This is not a duplicate of other questions, because the circumstances are different.