Support:Queries: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Hendrik Brummermann checking for bot |
imported>Hendrik Brummermann characters and accounts |
||
| Line 1: | Line 1: | ||
== Characters and accounts == |
|||
=== Account belonging to a character === |
|||
<source lang="SQL"> |
|||
SELECT account.* |
|||
FROM account, characters |
|||
WHERE characters.player_id=account.id AND charname='[character]'; |
|||
</source> |
|||
=== Characters belonging to an account === |
|||
<source lang="SQL"> |
|||
SELECT characters.* |
|||
FROM account, characters |
|||
WHERE characters.player_id=account.id AND username='[account]' |
|||
</source> |
|||
== Bots == |
== Bots == |
||
=== Finding Bots === |
=== Finding Bots === |
||
{{TODO}} |
|||
=== Checking if someone is a bot === |
=== Checking if someone is a bot === |
||
| Line 11: | Line 30: | ||
SELECT source, left(timedate, 13) As day, count(*) As cnt |
SELECT source, left(timedate, 13) As day, count(*) As cnt |
||
FROM gameEvents |
FROM gameEvents |
||
WHERE (source='[ |
WHERE (source='[character1]' OR source='[character2]') AND event='use' GROUP BY source, event, day ORDER BY day; |
||
</source> |
</source> |
||